summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-09-08 10:25:34 +0200
committerPauli <paul.dale@oracle.com>2019-09-11 00:27:26 +0200
commit92475712a9ca5e53913c4d1541ea9d044e183108 (patch)
treea58bdca8b8ccc78bfed45dc485ceecddf8bdd9e2 /test/evp_test.c
parentFix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey (diff)
downloadopenssl-92475712a9ca5e53913c4d1541ea9d044e183108.tar.xz
openssl-92475712a9ca5e53913c4d1541ea9d044e183108.zip
Coverity 1414465: Resource leaks (RESOURCE_LEAK)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 2f7506e6e6..1ff90c2283 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2008,8 +2008,10 @@ static int kdf_test_init(EVP_TEST *t, const char *name)
*kdata->p = OSSL_PARAM_construct_end();
kdf = EVP_KDF_fetch(NULL, name, NULL);
- if (kdf == NULL)
+ if (kdf == NULL) {
+ OPENSSL_free(kdata);
return 0;
+ }
kdata->ctx = EVP_KDF_CTX_new(kdf);
EVP_KDF_free(kdf);
if (kdata->ctx == NULL) {