anqp: fix potential NULL pointer dereference

This commit is contained in:
James Prestwood 2019-10-16 15:29:44 -07:00 committed by Denis Kenzior
parent 269377c92f
commit 81ec93fdcc
1 changed files with 3 additions and 0 deletions

View File

@ -287,6 +287,9 @@ uint32_t anqp_request(uint32_t ifindex, const uint8_t *addr,
uint32_t duration = 300;
struct netdev *netdev = netdev_find(ifindex);
if (!netdev)
return 0;
/*
* TODO: Netdev dependencies will eventually be removed so we need
* another way to figure out wiphy capabilities.