mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
CID 1442836: Resource leaks
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/8318)
This commit is contained in:
parent
9257959950
commit
909f2e5983
@ -143,11 +143,12 @@ static void alg_cleanup(size_t idx, ALGORITHM *a)
|
||||
|
||||
OSSL_METHOD_STORE *ossl_method_store_new(void)
|
||||
{
|
||||
OSSL_METHOD_STORE *res = OPENSSL_zalloc(sizeof(*res));
|
||||
OSSL_METHOD_STORE *res;
|
||||
|
||||
if (!RUN_ONCE(&method_store_init_flag, do_method_store_init))
|
||||
return 0;
|
||||
|
||||
res = OPENSSL_zalloc(sizeof(*res));
|
||||
if (res != NULL) {
|
||||
if ((res->algs = ossl_sa_ALGORITHM_new()) == NULL) {
|
||||
OPENSSL_free(res);
|
||||
|
Loading…
Reference in New Issue
Block a user