Avoid segfault if ret==0.

Submitted by: Nils Larsch
This commit is contained in:
Ulf Möller 2003-12-06 11:39:37 +00:00
parent 919f8bcd21
commit ce38bb1a8c

View file

@ -488,6 +488,7 @@ BIGNUM *BN_mod_inverse(BIGNUM *in,
err:
if ((ret == NULL) && (in == NULL)) BN_free(R);
BN_CTX_end(ctx);
bn_check_top(ret);
if (ret)
bn_check_top(ret);
return(ret);
}