diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-12-03 11:34:37 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-12-12 19:47:07 +0100 |
commit | ba4d833f6e24a83bc3e74ba55f52d8916b70fb59 (patch) | |
tree | ab6f6e9294c9db23e194953ab194ff4e227c49a2 /apps/smime.c | |
parent | Fix a possible memleak in cms_main (diff) | |
download | openssl-ba4d833f6e24a83bc3e74ba55f52d8916b70fb59.tar.xz openssl-ba4d833f6e24a83bc3e74ba55f52d8916b70fb59.zip |
Fix a possible memleak in smime_main
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22919)
Diffstat (limited to 'apps/smime.c')
-rw-r--r-- | apps/smime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/smime.c b/apps/smime.c index 88b0475d2d..b59e14b0b5 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -484,7 +484,8 @@ int smime_main(int argc, char **argv) "recipient certificate file"); if (cert == NULL) goto end; - sk_X509_push(encerts, cert); + if (!sk_X509_push(encerts, cert)) + goto end; cert = NULL; argv++; } |