krb5 commit [krb5-1.11]: Fix memory leak closing DIR ccaches

Tom Yu tlyu at MIT.EDU
Wed Feb 20 15:43:21 EST 2013


https://github.com/krb5/krb5/commit/ff074ccd98f1e8a41c35735e14f0b17112bbd36e
commit ff074ccd98f1e8a41c35735e14f0b17112bbd36e
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.
    
    (cherry picked from commit c264c4e824e1abe77806e7bf43ab2641459b7ee9)
    
    ticket: 7574
    version_fixed: 1.11.1
    status: resolved

 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