1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

getifaddrs: fix second lws_malloc

This commit is contained in:
Andy Green 2017-10-19 21:02:16 +08:00
parent c890b6f1b5
commit af07cca9f7

View file

@ -141,7 +141,7 @@ getifaddrs2(struct ifaddrs **ifap, int af, int siocgifconf, int siocgifflags,
(*end)->ifa_next = NULL;
(*end)->ifa_name = strdup(ifr->ifr_name);
(*end)->ifa_flags = ifreq.ifr_flags;
(*end)->ifa_addr = lws_malloc(salen);
(*end)->ifa_addr = lws_malloc(salen, "getifaddrs");
memcpy((*end)->ifa_addr, sa, salen);
(*end)->ifa_netmask = NULL;