summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/smime.c3
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++;
}