Avoid BN_CTX_free(uninitialized pointer).
authorAndy Polyakov <appro@openssl.org>
Tue, 21 Aug 2007 14:44:13 +0000 (14:44 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 21 Aug 2007 14:44:13 +0000 (14:44 +0000)
fips/dh/fips_dh_key.c

index 0cb4eb21e532c2093c3b79744da90e16f4e84d47..d20fa91d5e4f19445f1c091af1bd20fad2ed8ae6 100644 (file)
@@ -115,7 +115,7 @@ static int generate_key(DH *dh)
        if (FIPS_mode() && (BN_num_bits(dh->p) < OPENSSL_DH_FIPS_MIN_MODULUS_BITS))
                {
                DHerr(DH_F_GENERATE_KEY, DH_R_KEY_SIZE_TOO_SMALL);
-               goto err;
+               return 0;
                }
 
        ctx = BN_CTX_new();