From: Ezra Peisach Date: Thu, 29 Jun 2000 01:00:13 +0000 (+0000) Subject: prng.c (prng_cleanup): Ensure memory allocated before calling free X-Git-Tag: krb5-1.3-alpha1~2073 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8a4a325158e9f3c4471b9786b99f23b8ec776745;p=krb5.git prng.c (prng_cleanup): Ensure memory allocated before calling free git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12458 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index f1fbfff04..038dafc75 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,7 @@ +2000-06-28 Ezra Peisach + + * prng.c (prng_cleanup): Ensure memory allocated before calling free. + 2000-06-03 Tom Yu * Makefile.in(LIBMAJOR, LIBMINOR): Bump library version. diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index b22131e0f..78075a3f1 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -156,6 +156,6 @@ krb5_c_random_make_octets(krb5_context context, krb5_data *data) void prng_cleanup (void) { - free (random_state); + if (inited) free (random_state); inited = 0; }