From d285b5418ee1ff361f06545e0489ece61bdd1a50 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 14 Jun 2016 11:27:10 +0100 Subject: Avoid a double-free in crl2pl7 The variable |crtflst| could get double freed in an error path. Reviewed-by: Richard Levitte --- apps/crl2p7.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apps') 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; } } -- cgit v1.2.3