krb5 commit: Fix memory leak closing DIR ccaches

Greg Hudson ghudson at MIT.EDU
Wed Feb 20 12:10:27 EST 2013


https://github.com/krb5/krb5/commit/c264c4e824e1abe77806e7bf43ab2641459b7ee9
commit c264c4e824e1abe77806e7bf43ab2641459b7ee9
Author: Greg Hudson <ghudson at mit.edu>
Date:   Wed Feb 20 12:06:12 2013 -0500

    Fix memory leak closing DIR ccaches
    
    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 |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lib/krb5/ccache/cc_dir.c b/src/lib/krb5/ccache/cc_dir.c
index dc133f9..1c97485 100644
--- a/src/lib/krb5/ccache/cc_dir.c
+++ b/src/lib/krb5/ccache/cc_dir.c
@@ -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;
 }
 


More information about the cvs-krb5 mailing list