diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-07-06 14:31:32 +1000 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-07-08 11:19:08 +0300 |
commit | 821278a885c7c8edb5bca943006df5700257390e (patch) | |
tree | 8b4db3626168c8399c10d609ed2f4076557d4d26 /crypto | |
parent | fd7d574dd98761d41d87a777c0b4f044ecc075be (diff) |
Fix CID 1465214 Resource leak (in file_load.c)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/12379)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/store/loader_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c index ed74e55834..9a2ada335d 100644 --- a/crypto/store/loader_file.c +++ b/crypto/store/loader_file.c @@ -1545,8 +1545,10 @@ static OSSL_STORE_INFO *file_load(OSSL_STORE_LOADER_CTX *ctx, } while (matchcount == 0 && !file_eof(ctx) && !file_error(ctx)); /* We bail out on ambiguity */ - if (matchcount > 1) + if (matchcount > 1) { + OSSL_STORE_INFO_free(result); return NULL; + } if (result != NULL && ctx->expected_type != 0 |