Clean up memory leaks by releasing key at end
authorEzra Peisach <epeisach@mit.edu>
Tue, 20 Oct 2009 10:56:21 +0000 (10:56 +0000)
committerEzra Peisach <epeisach@mit.edu>
Tue, 20 Oct 2009 10:56:21 +0000 (10:56 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22951 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/crypto_tests/t_cksum.c
src/lib/crypto/crypto_tests/t_cts.c

index 2b5365119789f79810148f37329442336f06b42e..a544d9ee8758ece3c87e28b6eb5e9c603be07c02 100644 (file)
@@ -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);
 }
index fab5b27071cdaacd5499daf77bcbff7325da940d..596ca3b7d82ce4d0cdc5e672eb51089311525491 100644 (file)
@@ -169,6 +169,7 @@ static void test_cts()
            exit(1);
        }
     }
+    krb5_k_free_key(NULL, key);
 }
 
 int main (int argc, char **argv)