Patch from Riverbed (Derrick Pallas) under the license of the files they are in:

memory leak in krb5_get_creds_opt->ticket

	The function krb5_get_creds_opt_set_ticket copies a Ticket
	into a krb5_get_cred_opt structure. However,
	krb5_get_creds_opt_free does not clean up this Ticket, even
	thought he manual pages indicate that it should.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24945 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-03-25 15:37:42 +00:00
parent 5e4d827e61
commit f1a7da6a55

View File

@@ -1218,6 +1218,10 @@ krb5_get_creds_opt_free(krb5_context context, krb5_get_creds_opt opt)
{
if (opt->self)
krb5_free_principal(context, opt->self);
if (opt->ticket) {
free_Ticket(opt->ticket);
free(opt->ticket);
}
memset(opt, 0, sizeof(*opt));
free(opt);
}