Coverity 1453634: Resource leaks (RESOURCE_LEAK)

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9805)
This commit is contained in:
Pauli 2019-09-08 18:39:11 +10:00
parent d111712f6a
commit f20a59cb1c

View File

@ -174,8 +174,10 @@ static void *kmac_fetch_new(void *provctx, const OSSL_PARAM *params)
if (kctx == NULL)
return 0;
if (!ossl_prov_digest_load_from_params(&kctx->digest, params,
PROV_LIBRARY_CONTEXT_OF(provctx)))
PROV_LIBRARY_CONTEXT_OF(provctx))) {
kmac_free(kctx);
return 0;
}
kctx->out_len = EVP_MD_size(ossl_prov_digest_md(&kctx->digest));
return kctx;