From: Matt Caswell Date: Wed, 14 Mar 2018 14:40:18 +0000 (+0000) Subject: Fix a memory leak in the ca application X-Git-Tag: OpenSSL_1_0_2o~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=16a345e5c8b5c1166a5e214a8ee7ebf21d447fbe;p=oweals%2Fopenssl.git Fix a memory leak in the ca application Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5445) --- diff --git a/apps/ca.c b/apps/ca.c index 2490710a56..4f9de54921 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -2155,11 +2155,11 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, irow = NULL; ok = 1; err: - if (irow != NULL) { + if (ok != 1) { for (i = 0; i < DB_NUMBER; i++) OPENSSL_free(row[i]); - OPENSSL_free(irow); } + OPENSSL_free(irow); if (CAname != NULL) X509_NAME_free(CAname);