monitor: Fix memory leak

In the case that we use iwmon --interface nlmon
This commit is contained in:
Denis Kenzior 2014-10-04 20:50:16 -05:00
parent 38ab7511af
commit 73f5f0766d
1 changed files with 1 additions and 0 deletions

View File

@ -297,6 +297,7 @@ static void iwmon_interface_lookup_callback(int error, uint16_t type,
(IFF_UP | IFF_ALLMULTI | IFF_NOARP))
return;
l_free(monitor_interface->ifname);
monitor_interface->ifname = l_strndup(ifname, ifname_len);
monitor_interface->exists = true;
}