* t_encrypt.c (main): Free memory when finished to test for memory
authorEzra Peisach <epeisach@mit.edu>
Wed, 5 Dec 2001 23:30:00 +0000 (23:30 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 5 Dec 2001 23:30:00 +0000 (23:30 +0000)
leaks.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14048 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/ChangeLog
src/lib/crypto/t_encrypt.c

index cb59ebd828a4866f70d389882feecbbf4d0ec606..e102e4833653b4177afd246c15d42def0b00cf3c 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-05  Ezra Peisach  <epeisach@mit.edu>
+
+       * t_encrypt.c (main): Free memory when finished to test for memory
+       leaks.
+
 2001-11-20  Ezra Peisach  <epeisach@mit.edu>
 
        * Makefile.in (check-unix): Use $(srcdir) in file specification
index db20210c38c99420ce0a89d7364914f3add1f11a..a52c22659a2181dabe3aa9d8cacf1f21e8ce719a 100644 (file)
@@ -95,7 +95,14 @@ main ()
          krb5_c_decrypt (context, &key, 7, 0, &enc_out, &check));
     test ("free_state",
          krb5_c_free_state (context, &key, &state));
+    if(key.contents) {
+       free(key.contents);
+       key.contents = NULL;
+    }
   }
+
+  free(out.data);
+  free(check.data);
   return 0;
 }