diff options
Diffstat (limited to 'apps/apps.c')
-rw-r--r-- | apps/apps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/apps.c b/apps/apps.c index 904629b2f1..d68594ab27 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -1532,6 +1532,7 @@ int rand_serial(BIGNUM *b, ASN1_INTEGER *ai) { BIGNUM *btmp; int ret = 0; + if (b) btmp = b; else @@ -1549,7 +1550,7 @@ int rand_serial(BIGNUM *b, ASN1_INTEGER *ai) error: - if (!b) + if (btmp != b) BN_free(btmp); return ret; |