summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_enc.c
diff options
context:
space:
mode:
authortedu <>2014-05-30 02:52:11 +0000
committertedu <>2014-05-30 02:52:11 +0000
commit9598b4272312fc9b55154e675c1adb3a21b491b3 (patch)
treea802460259115af2ecf6be49736b1b6a09173232 /src/lib/libcrypto/evp/evp_enc.c
parent50df74c1961eaed1e88ea9c7bb4cfcab77d75043 (diff)
downloadopenbsd-9598b4272312fc9b55154e675c1adb3a21b491b3.tar.gz
openbsd-9598b4272312fc9b55154e675c1adb3a21b491b3.tar.bz2
openbsd-9598b4272312fc9b55154e675c1adb3a21b491b3.zip
no need for null check before free. from Brendan MacDonell
Diffstat (limited to 'src/lib/libcrypto/evp/evp_enc.c')
-rw-r--r--src/lib/libcrypto/evp/evp_enc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c
index 0c3e8fcc39..afe34f6f3f 100644
--- a/src/lib/libcrypto/evp/evp_enc.c
+++ b/src/lib/libcrypto/evp/evp_enc.c
@@ -548,8 +548,7 @@ EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
548 if (c->cipher_data) 548 if (c->cipher_data)
549 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); 549 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size);
550 } 550 }
551 if (c->cipher_data) 551 free(c->cipher_data);
552 free(c->cipher_data);
553#ifndef OPENSSL_NO_ENGINE 552#ifndef OPENSSL_NO_ENGINE
554 if (c->engine) 553 if (c->engine)
555 /* The EVP_CIPHER we used belongs to an ENGINE, release the 554 /* The EVP_CIPHER we used belongs to an ENGINE, release the