diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-09-11 06:38:31 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-09-21 14:39:36 +0200 |
commit | 8c040c086ca11a519975c58961a5dc933aa6524a (patch) | |
tree | 3ba0ef6ed64669b4dc82a50ba3e6905913f3cb7d /apps/genrsa.c | |
parent | 080bd08fd32608b4f2edfa4b1e87e199b08a8835 (diff) |
Fix some memory leaks in the openssl app
In some error cases the normal cleanup did not
happen, but instead an exit(1) which caused some
memory leaks, as reported in #22049.
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/22055)
Diffstat (limited to 'apps/genrsa.c')
-rw-r--r-- | apps/genrsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/genrsa.c b/apps/genrsa.c index 3151de646b..f71bc6eeb1 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -204,6 +204,8 @@ opthelp: goto end; } pkey = app_keygen(ctx, "RSA", num, verbose); + if (pkey == NULL) + goto end; if (verbose) { BIGNUM *e = NULL; |