diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-09-10 10:21:46 +0200 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-09-12 07:57:24 +0200 |
commit | 97f7a6d42e9d2f38969aff75b0d8f00d934ac8cf (patch) | |
tree | e803f8d4fd3ba8b1c8d70322a635c606ecc87ba5 /test/ossl_store_test.c | |
parent | Fix coverity issue: CID 1466483 - Improper use of Negative value in dh_ctrl.c (diff) | |
download | openssl-97f7a6d42e9d2f38969aff75b0d8f00d934ac8cf.tar.xz openssl-97f7a6d42e9d2f38969aff75b0d8f00d934ac8cf.zip |
Fix coverity issue: CID 1466482 - Resource leak in OSSL_STORE_SEARCH_by_key_fingerprint()
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12847)
Diffstat (limited to 'test/ossl_store_test.c')
-rw-r--r-- | test/ossl_store_test.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ossl_store_test.c b/test/ossl_store_test.c index 9b48827983..2ce7d51877 100644 --- a/test/ossl_store_test.c +++ b/test/ossl_store_test.c @@ -40,6 +40,17 @@ static int test_store_open(void) return ret; } +static int test_store_search_by_key_fingerprint_fail(void) +{ + int ret; + OSSL_STORE_SEARCH *search = NULL; + + ret = TEST_ptr_null(search = OSSL_STORE_SEARCH_by_key_fingerprint( + EVP_sha256(), NULL, 0)); + OSSL_STORE_SEARCH_free(search); + return ret; +} + const OPTIONS *test_get_options(void) { static const OPTIONS test_options[] = { @@ -68,5 +79,6 @@ int setup_tests(void) } ADD_TEST(test_store_open); + ADD_TEST(test_store_search_by_key_fingerprint_fail); return 1; } |