Skip to content

Commit

Permalink
Fix leak in capaths processing
Browse files Browse the repository at this point in the history
In k5_client_realm_path(), free the list of strings returned by
rtree_capaths_vals().

(cherry picked from commit 08756ce)

ticket: 8447
version_fixed: 1.14.4
  • Loading branch information
greghudson authored and tlyu committed Sep 2, 2016
1 parent 176642a commit 1cd322e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/krb5/krb/walk_rtree.c
Expand Up @@ -125,7 +125,7 @@ k5_client_realm_path(krb5_context context, const krb5_data *client,
const krb5_data *server, krb5_data **rpath_out)
{
krb5_error_code retval;
char **capvals;
char **capvals = NULL;
size_t i;
krb5_data *rpath = NULL, d;

Expand Down Expand Up @@ -160,6 +160,7 @@ k5_client_realm_path(krb5_context context, const krb5_data *client,
rpath = NULL;

cleanup:
profile_free_list(capvals);
krb5int_free_data_list(context, rpath);
return retval;
}
Expand Down

0 comments on commit 1cd322e

Please sign in to comment.