prng.c (prng_cleanup): Ensure memory allocated before calling free
authorEzra Peisach <epeisach@mit.edu>
Thu, 29 Jun 2000 01:00:13 +0000 (01:00 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 29 Jun 2000 01:00:13 +0000 (01:00 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12458 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/ChangeLog
src/lib/crypto/prng.c

index f1fbfff045c10f8374f4991da72df9a4d73f9f6d..038dafc7509b789e2cb829cb6b96a17d8fd7dcd0 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-28  Ezra Peisach  <epeisach@mit.edu>
+
+       * prng.c (prng_cleanup): Ensure memory allocated before calling free.
+
 2000-06-03  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in(LIBMAJOR, LIBMINOR): Bump library version.
index b22131e0f4ab8b702fccdb5ffdabdb2f5bfd986f..78075a3f1125de699c048988063d43e14b0a2dcc 100644 (file)
@@ -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;
 }