Don't free the BIGNUM passed to BN_mpi2bn
[openssl.git] / crypto / bn / bn_intern.c
index 0b222517d47733e3a647a2abd920b2f4c12caf92..abc8fc45a1780728b7e1d32e569d27de24e34256 100644 (file)
@@ -74,7 +74,7 @@ signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len)
 
     if (BN_is_zero(scalar)) {
         r = OPENSSL_malloc(1);
-        if (!r) {
+        if (r == NULL) {
             BNerr(BN_F_BN_COMPUTE_WNAF, ERR_R_MALLOC_FAILURE);
             goto err;
         }