From 8c9735fbe00283210203b3a9de8858c468b7521a Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 27 Feb 2020 23:06:12 +0000 Subject: [PATCH] Plug possible memory leaks in the previous patch. Two DH_free() calls were accidentally removed. Pointyhat to: jkim --- contrib/sendmail/src/tls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/sendmail/src/tls.c b/contrib/sendmail/src/tls.c index 43ef9712111c..40219da382b8 100644 --- a/contrib/sendmail/src/tls.c +++ b/contrib/sendmail/src/tls.c @@ -92,6 +92,7 @@ get_dh512() dhg_bn = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); if ((dhp_bn == NULL) || (dhg_bn == NULL)) { + DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); return NULL; @@ -155,6 +156,7 @@ get_dh2048() dhg_bn = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); if ((dhp_bn == NULL) || (dhg_bn == NULL)) { + DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); return NULL;