From cde93db00d4f5cff864070ebfed2d0c36e532e71 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 23 Nov 2018 23:55:36 +0000 Subject: [PATCH] Avoid leaving $domain live with bogus info, during server connection startup Recent efforts to reduce string-copy ops while also avoiding using excessive memory tripped a check on freeing the still-live variable. It is unclear why the variable was set anyway, even though commented. The use was introduced between Exim 3.36 and 4.0 --- src/src/smtp_in.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index e9e817798..af2cdb285 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -4169,9 +4169,8 @@ while (done <= 0) because otherwise the log can be confusing. */ if ( !sender_host_name - && (deliver_domain = sender_helo_name, /* set $domain */ - match_isinlist(sender_helo_name, CUSS &helo_lookup_domains, 0, - &domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL)) == OK) + && match_isinlist(sender_helo_name, CUSS &helo_lookup_domains, 0, + &domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL) == OK) (void)host_name_lookup(); /* Rebuild the fullhost info to include the HELO name (and the real name -- 2.25.1