resolve: fix NULL-pointer dereference
Fixes a bug introduced by 16a6bc5a7a.
Fixes CID#1501514.
This commit is contained in:
@@ -486,7 +486,7 @@ static int etc_hosts_lookup_by_name(
|
||||
break;
|
||||
}
|
||||
|
||||
SET_FOREACH(a, item->addresses) {
|
||||
SET_FOREACH(a, item ? item->addresses : NULL) {
|
||||
_cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
|
||||
|
||||
if ((!found_a && a->family == AF_INET) ||
|
||||
|
||||
Reference in New Issue
Block a user