Skip to content

Commit

Permalink
plug potential memory leak in error code path
Browse files Browse the repository at this point in the history
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 #23836)
  • Loading branch information
Sashan authored and t8m committed Mar 15, 2024
1 parent 12f5f26 commit 707b54b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/conf/conf_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 707b54b

Please sign in to comment.