mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix memory leak in engine_cleanup_add_first()
Fixes #20870 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20880)
This commit is contained in:
parent
507356598b
commit
8c63b14296
@ -140,8 +140,9 @@ void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb)
|
||||
if (!int_cleanup_check(1))
|
||||
return;
|
||||
item = int_cleanup_item(cb);
|
||||
if (item)
|
||||
sk_ENGINE_CLEANUP_ITEM_insert(cleanup_stack, item, 0);
|
||||
if (item != NULL)
|
||||
if (sk_ENGINE_CLEANUP_ITEM_insert(cleanup_stack, item, 0) <= 0)
|
||||
OPENSSL_free(item);
|
||||
}
|
||||
|
||||
void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb)
|
||||
|
Loading…
Reference in New Issue
Block a user