From 6403471dc838572d4fd1e1609a81a999f0d71b2f Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 14 Mar 2018 14:32:48 +0000 Subject: [PATCH] Fix a memory leak in the ca application Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5627) --- apps/ca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ca.c b/apps/ca.c index 8596b5f520..02186a12ec 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -1864,11 +1864,11 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, irow = NULL; ok = 1; end: - if (irow != NULL) { + if (ok != 1) { for (i = 0; i < DB_NUMBER; i++) OPENSSL_free(row[i]); - OPENSSL_free(irow); } + OPENSSL_free(irow); X509_NAME_free(CAname); X509_NAME_free(subject); -- 2.25.1