Procházet zdrojové kódy

ip: fixed memory leak

free the interface list before returning from the function
master
Tobias Tschinkowitz před 6 roky
committed by Aaron Marcher
rodič
revize
1cd8a7b510
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. +1
    -0
      components/ip.c

+ 1
- 0
components/ip.c Zobrazit soubor

@@ -31,6 +31,7 @@ ip(const char *iface, unsigned short sa_family)
host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (!strcmp(ifa->ifa_name, iface) &&
(ifa->ifa_addr->sa_family == sa_family)) {
freeifaddrs(ifaddr);
if (s != 0) {
warn("getnameinfo: %s", gai_strerror(s));
return NULL;


Načítá se…
Zrušit
Uložit