summaryrefslogtreecommitdiffstats
path: root/src/crypto/bn/convert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/bn/convert.c')
-rw-r--r--src/crypto/bn/convert.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/crypto/bn/convert.c b/src/crypto/bn/convert.c
index 9c7b9be..531b661 100644
--- a/src/crypto/bn/convert.c
+++ b/src/crypto/bn/convert.c
@@ -407,13 +407,9 @@ char *BN_bn2dec(const BIGNUM *a) {
ok = 1;
err:
- if (bn_data != NULL) {
- OPENSSL_free(bn_data);
- }
- if (t != NULL) {
- BN_free(t);
- }
- if (!ok && buf) {
+ OPENSSL_free(bn_data);
+ BN_free(t);
+ if (!ok) {
OPENSSL_free(buf);
buf = NULL;
}