summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/engine/hw_cryptodev.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/engine/hw_cryptodev.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/engine/hw_cryptodev.c')
-rw-r--r--lib/libcrypto/engine/hw_cryptodev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c
index 7d550451649..7da9913d285 100644
--- a/lib/libcrypto/engine/hw_cryptodev.c
+++ b/lib/libcrypto/engine/hw_cryptodev.c
@@ -926,8 +926,7 @@ zapparams(struct crypt_kop *kop)
int i;
for (i = 0; i <= kop->crk_iparams + kop->crk_oparams; i++) {
- if (kop->crk_param[i].crp_p)
- free(kop->crk_param[i].crp_p);
+ free(kop->crk_param[i].crp_p);
kop->crk_param[i].crp_p = NULL;
kop->crk_param[i].crp_nbits = 0;
}