krb5 commit: Fix memory leak in t_cc.c

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/44fb8f29abc69c3b2d28676245426ce8bc30a834
commit 44fb8f29abc69c3b2d28676245426ce8bc30a834
Author: Greg Hudson <[email protected]>
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);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.