Skip to content

Commit efdf275

Browse files
committed
Fix more of the same crash
1 parent fe95893 commit efdf275

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mdns.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ mdns_list_interfaces(multicast_if** pp_intfs, size_t* p_nb_intf, int ai_family)
117117
return (MDNS_ERROR);
118118
}
119119
for (c = ifs; c != NULL; c = c->ifa_next) {
120-
if (c->ifa_addr->sa_family != ai_family || !mdns_is_interface_valuable(c))
120+
if (c->ifa_addr == NULL ||
121+
c->ifa_addr->sa_family != ai_family ||
122+
!mdns_is_interface_valuable(c))
121123
continue;
122124
memcpy(intfs, c->ifa_addr, sizeof(*intfs));
123125
intfs++;

0 commit comments

Comments
 (0)