svn rev #22718: trunk/src/lib/gssapi/krb5/
ghudson@MIT.EDU
ghudson at MIT.EDU
Wed Sep 9 11:17:09 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22718
Commit By: ghudson
Log Message:
ticket: 6558
subject: Fix memory leak in gss_krb5int_copy_ccache
tags: pullup
target_version: 1.7.1
gss_krb5int_copy_ccache was iterating over credentials in a ccache
without freeing them.
Changed Files:
U trunk/src/lib/gssapi/krb5/copy_ccache.c
Modified: trunk/src/lib/gssapi/krb5/copy_ccache.c
===================================================================
--- trunk/src/lib/gssapi/krb5/copy_ccache.c 2009-09-09 10:49:35 UTC (rev 22717)
+++ trunk/src/lib/gssapi/krb5/copy_ccache.c 2009-09-09 15:17:09 UTC (rev 22718)
@@ -50,8 +50,11 @@
krb5_free_context(context);
return(GSS_S_FAILURE);
}
- while (!code && !krb5_cc_next_cred(context, k5creds->ccache, &cursor, &creds))
+ while (!code && !krb5_cc_next_cred(context, k5creds->ccache, &cursor,
+ &creds)) {
code = krb5_cc_store_cred(context, out_ccache, &creds);
+ krb5_free_cred_contents(context, &creds);
+ }
krb5_cc_end_seq_get(context, k5creds->ccache, &cursor);
k5_mutex_unlock(&k5creds->lock);
*minor_status = code;
More information about the cvs-krb5
mailing list