summaryrefslogtreecommitdiffstats
path: root/crypto/store
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-09-10 08:40:24 +0200
committerShane Lontis <shane.lontis@oracle.com>2020-09-12 07:57:23 +0200
commit34816949460e7131af4de421806845be213354d4 (patch)
tree10af183fbce5451abae6184e017f460fad05e1a6 /crypto/store
parentOSSL_DECODER 'decode' function must never be NULL. (diff)
downloadopenssl-34816949460e7131af4de421806845be213354d4.tar.xz
openssl-34816949460e7131af4de421806845be213354d4.zip
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 <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12847)
Diffstat (limited to 'crypto/store')
-rw-r--r--crypto/store/store_lib.c1
1 files changed, 1 insertions, 0 deletions
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;
}