Skip to content

Commit

Permalink
Fix a possible memleak in smime_main
Browse files Browse the repository at this point in the history
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #22919)

(cherry picked from commit ba4d833)
  • Loading branch information
bernd-edlinger authored and t8m committed Dec 12, 2023
1 parent dfe3207 commit 03e6213
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/smime.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,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++;
}
Expand Down

0 comments on commit 03e6213

Please sign in to comment.