]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix memory leak closing DIR ccaches
authorGreg Hudson <ghudson@mit.edu>
Wed, 20 Feb 2013 17:06:12 +0000 (12:06 -0500)
committerGreg Hudson <ghudson@mit.edu>
Wed, 20 Feb 2013 17:06:12 +0000 (12:06 -0500)
A ccache type's close function is supposed to free the cache container
as well as the type-specific data.  dcc_close was not doing so,
causing a small memory leak each time a ccache is created or
destroyed.

ticket: 7574 (new)
target_version: 1.11.1
tags: pullup

src/lib/krb5/ccache/cc_dir.c

index dc133f91bad577ef90d6d814e9be93507822510d..1c97485aca3e8af1e407b769ba7a6690938d6385 100644 (file)
@@ -435,6 +435,7 @@ dcc_close(krb5_context context, krb5_ccache cache)
     ret = krb5_fcc_ops.close(context, data->fcc);
     free(data->residual);
     free(data);
+    free(cache);
     return ret;
 }