diff options
author | 2018-02-07 08:57:25 +0000 | |
---|---|---|
committer | 2018-02-07 08:57:25 +0000 | |
commit | c4ec5d7da4b40b4da760669d2b374e9c92742f7b (patch) | |
tree | eb72812c3e6edfc28233a2a79bd9c33e8b20f4bd | |
parent | make some wording better. (diff) | |
download | wireguard-openbsd-c4ec5d7da4b40b4da760669d2b374e9c92742f7b.tar.xz wireguard-openbsd-c4ec5d7da4b40b4da760669d2b374e9c92742f7b.zip |
Restore a check before BN_free() that needs to exist and write it such that
the intent is more obvious.
-rw-r--r-- | usr.bin/openssl/apps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/openssl/apps.c b/usr.bin/openssl/apps.c index 22b6b2838bf..90baf65a9f5 100644 --- a/usr.bin/openssl/apps.c +++ b/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.46 2018/02/07 05:47:55 jsing Exp $ */ +/* $OpenBSD: apps.c,v 1.47 2018/02/07 08:57:25 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -1425,7 +1425,8 @@ rand_serial(BIGNUM *b, ASN1_INTEGER *ai) ret = 1; error: - BN_free(btmp); + if (b != btmp) + BN_free(btmp); return ret; } |