From 092e2044d682145eabaf83795e82bd00685e06df Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 25 Nov 2018 13:11:37 +0100 Subject: [PATCH] Fix possible resource leak Signed-off-by: Sven Strickroth --- src/Utils/HwSMTP.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Utils/HwSMTP.cpp b/src/Utils/HwSMTP.cpp index 3b1e602e2..0abe6f6c7 100644 --- a/src/Utils/HwSMTP.cpp +++ b/src/Utils/HwSMTP.cpp @@ -138,6 +138,7 @@ BOOL CHwSMTP::SendSpeedEmail ret = false; continue; } + SCOPE_EXIT { DnsRecordListFree(pDnsRecord, DnsFreeRecordList); }; CString to; to.Empty(); @@ -161,9 +162,6 @@ BOOL CHwSMTP::SendSpeedEmail } if (!pNext) ret = false; - - if (pDnsRecord) - DnsRecordListFree(pDnsRecord,DnsFreeRecordList); } return ret; -- 2.11.4.GIT