From: Ezra Peisach Date: Wed, 5 Dec 2001 23:30:00 +0000 (+0000) Subject: * t_encrypt.c (main): Free memory when finished to test for memory X-Git-Tag: krb5-1.3-alpha1~920 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=91a7b5132eeea7d95678dbc266bd4a07524c31a4;p=krb5.git * t_encrypt.c (main): Free memory when finished to test for memory leaks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14048 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index cb59ebd82..e102e4833 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 Ezra Peisach + + * t_encrypt.c (main): Free memory when finished to test for memory + leaks. + 2001-11-20 Ezra Peisach * Makefile.in (check-unix): Use $(srcdir) in file specification diff --git a/src/lib/crypto/t_encrypt.c b/src/lib/crypto/t_encrypt.c index db20210c3..a52c22659 100644 --- a/src/lib/crypto/t_encrypt.c +++ b/src/lib/crypto/t_encrypt.c @@ -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; }