kswitch: memory leaks
ids and name must be freed before they go out of scope. Change-Id: I0133c27994f7dc2832cea6b8529c060ed779c2ab
This commit is contained in:
@@ -123,12 +123,13 @@ kswitch(struct kswitch_options *opt, int argc, char **argv)
|
||||
|
||||
id = ids[i - 1];
|
||||
ids[i - 1] = NULL;
|
||||
free(name);
|
||||
} else
|
||||
krb5_errx(heimtools_context, 1, "No cache selected");
|
||||
for (i = 0; i < len; i++)
|
||||
if (ids[i])
|
||||
krb5_cc_close(heimtools_context, ids[i]);
|
||||
|
||||
free(ids);
|
||||
} else if (opt->principal_string) {
|
||||
krb5_principal p;
|
||||
|
||||
|
Reference in New Issue
Block a user