diff options
author | jsing <> | 2018-02-07 08:57:25 +0000 |
---|---|---|
committer | jsing <> | 2018-02-07 08:57:25 +0000 |
commit | 0f9daa999154f16ec08ad51c9d547e61e665c9a1 (patch) | |
tree | 6abebd179754400f63d5ad1e53d616ee1b9b7ed5 | |
parent | 1d38b78d8364c43408f3ba4af999c875f43f0ea0 (diff) | |
download | openbsd-0f9daa999154f16ec08ad51c9d547e61e665c9a1.tar.gz openbsd-0f9daa999154f16ec08ad51c9d547e61e665c9a1.tar.bz2 openbsd-0f9daa999154f16ec08ad51c9d547e61e665c9a1.zip |
Restore a check before BN_free() that needs to exist and write it such that
the intent is more obvious.
-rw-r--r-- | src/usr.bin/openssl/apps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 22b6b2838b..90baf65a9f 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: apps.c,v 1.46 2018/02/07 05:47:55 jsing Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.47 2018/02/07 08:57:25 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -1425,7 +1425,8 @@ rand_serial(BIGNUM *b, ASN1_INTEGER *ai) | |||
1425 | ret = 1; | 1425 | ret = 1; |
1426 | 1426 | ||
1427 | error: | 1427 | error: |
1428 | BN_free(btmp); | 1428 | if (b != btmp) |
1429 | BN_free(btmp); | ||
1429 | 1430 | ||
1430 | return ret; | 1431 | return ret; |
1431 | } | 1432 | } |