diff options
| author | jsing <> | 2018-02-07 08:57:25 +0000 |
|---|---|---|
| committer | jsing <> | 2018-02-07 08:57:25 +0000 |
| commit | a78008af5a114ef40aaa7d80d102e1649d818c7e (patch) | |
| tree | 6abebd179754400f63d5ad1e53d616ee1b9b7ed5 /src | |
| parent | 9ef9bad36c2bd1fe1d022832430b8e371e1a0bf3 (diff) | |
| download | openbsd-a78008af5a114ef40aaa7d80d102e1649d818c7e.tar.gz openbsd-a78008af5a114ef40aaa7d80d102e1649d818c7e.tar.bz2 openbsd-a78008af5a114ef40aaa7d80d102e1649d818c7e.zip | |
Restore a check before BN_free() that needs to exist and write it such that
the intent is more obvious.
Diffstat (limited to 'src')
| -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 | } |
