mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Properly own the duplicated string
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
399de49699
commit
b7b8e94801
@ -286,8 +286,13 @@ static CONF_MODULE *module_add(DSO *dso, const char *name,
|
||||
tmod->name = OPENSSL_strdup(name);
|
||||
tmod->init = ifunc;
|
||||
tmod->finish = ffunc;
|
||||
if (tmod->name == NULL) {
|
||||
OPENSSL_free(tmod);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!sk_CONF_MODULE_push(supported_modules, tmod)) {
|
||||
OPENSSL_free(tmod->name);
|
||||
OPENSSL_free(tmod);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user