Fix crash in SPF DNS usage
[exim.git] / src / src / spf.c
index 100e22243502edbd3739a954b68ac20a9e1e6cd2..ef55520b10041a5d010540aebb5ae528e0260efb 100644 (file)
@@ -97,7 +97,8 @@ switch (dns_lookup(dnsa, US domain, rr_type, NULL))
     srr.herrno = NETDB_SUCCESS;
     for (dns_record * rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS); rr;
         rr = dns_next_rr(dnsa, &dnss, RESET_NEXT))
-      if (rr->type == rr_type) { found++; break; }
+      /* Need to alloc space for all records, so no early-out */
+      if (rr->type == rr_type) found++;
     break;
   }