mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
plug potential memory leak in error code path
Function `module_add()` may leak stack of modules when it fails to initialize newly added module. Fixes #23835 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23836)
This commit is contained in:
parent
12f5f26e1e
commit
707b54bee2
@ -372,6 +372,7 @@ static CONF_MODULE *module_add(DSO *dso, const char *name,
|
||||
OPENSSL_free(tmod->name);
|
||||
OPENSSL_free(tmod);
|
||||
}
|
||||
sk_CONF_MODULE_free(new_modules);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user