diff options
Diffstat (limited to 'crypto/bn/bn_print.c')
-rw-r--r-- | crypto/bn/bn_print.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 8b59e78916..1ef5a879c2 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -156,15 +156,12 @@ char *BN_bn2dec(const BIGNUM *a) } ok = 1; err: - if (bn_data != NULL) - OPENSSL_free(bn_data); + OPENSSL_free(bn_data); BN_free(t); - if (!ok && buf) { - OPENSSL_free(buf); - buf = NULL; - } - - return (buf); + if (ok) + return buf; + OPENSSL_free(buf); + return NULL; } int BN_hex2bn(BIGNUM **bn, const char *a) |