comparison src/dnsbl.cpp @ 35:d718dca81bc9

fix dangling reference
author carl
date Sun, 30 May 2004 17:47:13 -0700
parents fc7f8f3ea90f
children 95607fbef608
comparison
equal deleted inserted replaced
34:fc7f8f3ea90f 35:d718dca81bc9
568 count++; 568 count++;
569 if ((count > lim) && (lim > 0)) { 569 if ((count > lim) && (lim > 0)) {
570 discard(nameservers); 570 discard(nameservers);
571 return reject_host; 571 return reject_host;
572 } 572 }
573 host = *i; 573 host = *i; // a reference into priv.memory->hosts, which will live until this smtp transaction is closed
574 ip = protected_dns_interface(host, true, &nameservers); 574 ip = protected_dns_interface(host, true, &nameservers);
575 if (debug_syslog) { 575 if (debug_syslog) {
576 char buf[200]; 576 char buf[200];
577 if (ip) { 577 if (ip) {
578 char adr[sizeof "255.255.255.255"]; 578 char adr[sizeof "255.255.255.255"];
598 count++; 598 count++;
599 if ((count > lim) && (lim > 0)) { 599 if ((count > lim) && (lim > 0)) {
600 discard(nameservers); 600 discard(nameservers);
601 return reject_host; 601 return reject_host;
602 } 602 }
603 host = (*i).first; 603 host = register_string(priv.memory->hosts, (*i).first); // put a copy into priv.memory->hosts, and return that reference
604 ip = (*i).second; 604 ip = (*i).second;
605 if (!ip) ip = protected_dns_interface(host, false, NULL); 605 if (!ip) ip = protected_dns_interface(host, false, NULL);
606 if (debug_syslog) { 606 if (debug_syslog) {
607 char buf[200]; 607 char buf[200];
608 if (ip) { 608 if (ip) {