From: Jeremy Harris Date: Fri, 23 Nov 2018 23:55:36 +0000 (+0000) Subject: Avoid leaving $domain live with bogus info, during server connection startup X-Git-Tag: exim-4.92-RC1~19 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cde93db00d4f5cff864070ebfed2d0c36e532e71;p=exim.git 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 --- 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