From 34816949460e7131af4de421806845be213354d4 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Thu, 10 Sep 2020 16:40:24 +1000 Subject: Fix coverity issue: CID 1466486 - Resource leak in OSSL_STORE Note that although this is a false positive currently, it could become possible if any of the methods called change behaviour - so it is safer to add the fix than to ignore it. Added a simple test so that I could prove this was the case. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/12847) --- crypto/store/store_lib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'crypto/store') diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index 61558a9b6e..98e49d826d 100644 --- a/crypto/store/store_lib.c +++ b/crypto/store/store_lib.c @@ -178,6 +178,7 @@ OSSL_STORE_open_with_libctx(const char *uri, } OSSL_STORE_LOADER_free(fetched_loader); OPENSSL_free(propq_copy); + OPENSSL_free(ctx); return NULL; } -- cgit v1.2.3