summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/rsa
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/rsa
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/rsa')
-rw-r--r--lib/libcrypto/rsa/rsa_pmeth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/rsa/rsa_pmeth.c b/lib/libcrypto/rsa/rsa_pmeth.c
index 5580b7783ad..e75596afa38 100644
--- a/lib/libcrypto/rsa/rsa_pmeth.c
+++ b/lib/libcrypto/rsa/rsa_pmeth.c
@@ -148,8 +148,7 @@ static void pkey_rsa_cleanup(EVP_PKEY_CTX *ctx)
{
if (rctx->pub_exp)
BN_free(rctx->pub_exp);
- if (rctx->tbuf)
- free(rctx->tbuf);
+ free(rctx->tbuf);
free(rctx);
}
}