krb5 commit [krb5-1.14]: Fix memory leak destroying DIR ccache

Tom Yu tlyu at mit.edu
Fri Sep 2 17:04:19 EDT 2016


https://github.com/krb5/krb5/commit/7911d13ef37175d5336f18395e709cacd941f7c9
commit 7911d13ef37175d5336f18395e709cacd941f7c9
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Jun 26 00:46:39 2016 -0400

    Fix memory leak destroying DIR ccache
    
    Credential cache destroy methods are supposed to free the krb5_ccache
    structure as well as its contents, but dcc_destroy() was not doing so.
    
    (cherry picked from commit 6f8597f85642562bf672eb9a3be542907d0555c1)
    
    ticket: 8433
    version_fixed: 1.14.4

 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 b00a6bb..bba64e5 100644
--- a/src/lib/krb5/ccache/cc_dir.c
+++ b/src/lib/krb5/ccache/cc_dir.c
@@ -445,6 +445,7 @@ dcc_destroy(krb5_context context, krb5_ccache cache)
     ret = krb5_fcc_ops.destroy(context, data->fcc);
     free(data->residual);
     free(data);
+    free(cache);
     return ret;
 }
 


More information about the cvs-krb5 mailing list