krb5 commit: Fix memory leak in t_cc.c

Greg Hudson ghudson at mit.edu
Sun Jan 24 10:54:44 EST 2021


https://github.com/krb5/krb5/commit/44fb8f29abc69c3b2d28676245426ce8bc30a834
commit 44fb8f29abc69c3b2d28676245426ce8bc30a834
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Jan 24 09:59:57 2021 -0500

    Fix memory leak in t_cc.c
    
    In test_order() (added by commit
    722b77ba31ea4e2937e6820f0fe4a19a7445e8fc), release the cursor and
    ccache before returning.

 src/lib/krb5/ccache/t_cc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/lib/krb5/ccache/t_cc.c b/src/lib/krb5/ccache/t_cc.c
index 2677252..edd2209 100644
--- a/src/lib/krb5/ccache/t_cc.c
+++ b/src/lib/krb5/ccache/t_cc.c
@@ -598,6 +598,8 @@ test_order(krb5_context context, const char *name)
                "second cred does not match", "principal_compare");
     krb5_free_cred_contents(context, &creds);
 
+    krb5_cc_end_seq_get(context, id, &cursor);
+    krb5_cc_close(context, id);
     free_test_cred(context);
 }
 


More information about the cvs-krb5 mailing list