From 0f1af7fceb54a1c42b017731c0d71f3434a8c3a3 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 20 Oct 2009 10:56:21 +0000 Subject: [PATCH] Clean up memory leaks by releasing key at end git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22951 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/crypto_tests/t_cksum.c | 3 +++ src/lib/crypto/crypto_tests/t_cts.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/lib/crypto/crypto_tests/t_cksum.c b/src/lib/crypto/crypto_tests/t_cksum.c index 2b5365119..a544d9ee8 100644 --- a/src/lib/crypto/crypto_tests/t_cksum.c +++ b/src/lib/crypto/crypto_tests/t_cksum.c @@ -138,5 +138,8 @@ main(argc, argv) free(newstyle_checksum.data); if (!kret) printf("%d tests passed successfully for MD%d checksum\n", argc-1, MD); + + krb5_k_free_key(NULL, key); + return(kret); } diff --git a/src/lib/crypto/crypto_tests/t_cts.c b/src/lib/crypto/crypto_tests/t_cts.c index fab5b2707..596ca3b7d 100644 --- a/src/lib/crypto/crypto_tests/t_cts.c +++ b/src/lib/crypto/crypto_tests/t_cts.c @@ -169,6 +169,7 @@ static void test_cts() exit(1); } } + krb5_k_free_key(NULL, key); } int main (int argc, char **argv) -- 2.26.2