From: Scott Wilson Date: Thu, 31 Oct 2019 11:37:51 +0000 (+1100) Subject: Fix potential memory leak in dh_ameth.c X-Git-Tag: openssl-3.0.0-alpha1~1056 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6624e1f7b6a397948561e9cc2774f0c8af1d2c79;p=oweals%2Fopenssl.git Fix potential memory leak in dh_ameth.c Free dukm in error handling of dh_cms_encrypt() Fixes #10294 Reviewed-by: Matt Caswell Reviewed-by: Patrick Steuer (Merged from https://github.com/openssl/openssl/pull/10310) --- diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index abb9bfdcbe..7907f50192 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -976,6 +976,7 @@ static int dh_cms_encrypt(CMS_RecipientInfo *ri) err: OPENSSL_free(penc); X509_ALGOR_free(wrap_alg); + OPENSSL_free(dukm); return rv; }