summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/dh/dh_lib.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-30 02:52:11 +0000
committertedu <tedu@openbsd.org>2014-05-30 02:52:11 +0000
commit79cf10b54a26622a11d35087aba9f958451114fa (patch)
tree9ee8fbaaff84d75fefa27fdccea729bde4f2714e /lib/libcrypto/dh/dh_lib.c
parentDon't write out more than we have allocated in obj_txt, as the glory (diff)
downloadwireguard-openbsd-79cf10b54a26622a11d35087aba9f958451114fa.tar.xz
wireguard-openbsd-79cf10b54a26622a11d35087aba9f958451114fa.zip
no need for null check before free. from Brendan MacDonell
Diffstat (limited to 'lib/libcrypto/dh/dh_lib.c')
-rw-r--r--lib/libcrypto/dh/dh_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcrypto/dh/dh_lib.c b/lib/libcrypto/dh/dh_lib.c
index e09c5fdd21c..7a680cc5b48 100644
--- a/lib/libcrypto/dh/dh_lib.c
+++ b/lib/libcrypto/dh/dh_lib.c
@@ -193,7 +193,7 @@ void DH_free(DH *r)
if (r->g != NULL) BN_clear_free(r->g);
if (r->q != NULL) BN_clear_free(r->q);
if (r->j != NULL) BN_clear_free(r->j);
- if (r->seed) free(r->seed);
+ free(r->seed);
if (r->counter != NULL) BN_clear_free(r->counter);
if (r->pub_key != NULL) BN_clear_free(r->pub_key);
if (r->priv_key != NULL) BN_clear_free(r->priv_key);