libiwinfo: clear buffer in nl80211_phy2ifname(), prevents running operations against the wrong phy if no interfaces are found (#347)
This commit is contained in:
parent
0ecbaa400e
commit
01a12c4d5e
1 changed files with 2 additions and 0 deletions
|
@ -452,6 +452,8 @@ static char * nl80211_phy2ifname(const char *ifname)
|
|||
else if (!strncmp(ifname, "radio", 5))
|
||||
phyidx = atoi(&ifname[5]);
|
||||
|
||||
memset(nif, 0, sizeof(nif));
|
||||
|
||||
if (phyidx > -1)
|
||||
{
|
||||
if ((d = opendir("/sys/class/net")) != NULL)
|
||||
|
|
Loading…
Reference in a new issue