diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-09-10 18:21:46 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-09-12 15:57:24 +1000 |
commit | 97f7a6d42e9d2f38969aff75b0d8f00d934ac8cf (patch) | |
tree | e803f8d4fd3ba8b1c8d70322a635c606ecc87ba5 /test | |
parent | 9951eaf467f8cc43ffad69222b42340c3b24cd52 (diff) |
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')
-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; } |