From: Richard Levitte Date: Fri, 10 Jan 2003 08:59:46 +0000 (+0000) Subject: Make sure everything that may be freed is allocated or initiated. X-Git-Tag: OpenSSL_0_9_7a~86^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8ea5cb5799647d0becdb9f16a0e9c13875c6c3f;p=thirdparty%2Fopenssl.git Make sure everything that may be freed is allocated or initiated. PR: 446 --- diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 43eb9e6dfd0..6c16029957e 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -163,9 +163,9 @@ int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, BN_CTX *ctx; int checks = BN_prime_checks_for_size(bits); + BN_init(&t); ctx=BN_CTX_new(); if (ctx == NULL) goto err; - BN_init(&t); loop: /* make a random number and set the top and bottom bits */ if (add == NULL)