summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-06-14 11:27:10 +0100
committerMatt Caswell <matt@openssl.org>2016-06-14 11:27:10 +0100
commitd285b5418ee1ff361f06545e0489ece61bdd1a50 (patch)
tree17fa977a559b3294fd1c10e903cd62711ffd6236
parenta45dca668e375bb4f4eaaf98521a3c3f5f82a0c9 (diff)
downloadopenssl-new-d285b5418ee1ff361f06545e0489ece61bdd1a50.tar.gz
Avoid a double-free in crl2pl7
The variable |crtflst| could get double freed in an error path. Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r--apps/crl2p7.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index 1631258793..9c5f79f9f3 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -84,10 +84,8 @@ int crl2pkcs7_main(int argc, char **argv)
if ((certflst == NULL)
&& (certflst = sk_OPENSSL_STRING_new_null()) == NULL)
goto end;
- if (!sk_OPENSSL_STRING_push(certflst, opt_arg())) {
- sk_OPENSSL_STRING_free(certflst);
+ if (!sk_OPENSSL_STRING_push(certflst, opt_arg()))
goto end;
- }
break;
}
}