]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix memory leak in t_cc.c
authorGreg Hudson <ghudson@mit.edu>
Sun, 24 Jan 2021 14:59:57 +0000 (09:59 -0500)
committerGreg Hudson <ghudson@mit.edu>
Sun, 24 Jan 2021 14:59:57 +0000 (09:59 -0500)
In test_order() (added by commit
722b77ba31ea4e2937e6820f0fe4a19a7445e8fc), release the cursor and
ccache before returning.

src/lib/krb5/ccache/t_cc.c

index 267725240d1f41c423bf73a748521ad0b2de7708..edd220940e11fc1ef50177320110871383deaa8b 100644 (file)
@@ -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);
 }