3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

p2p: Fix adding peers from Probe Request info

Make sure dev->peer_list is non-NULL before using l_queue_push_tail()
same as we do when the peer info comes from a Probe Response (active
scan in Find Phase).  Otherwise peers discovered through Probe Requests
before any Probe Responses are received will be lost.
This commit is contained in:
Andrew Zaborowski 2020-09-29 18:37:08 +02:00 committed by Denis Kenzior
parent 520ad56f83
commit ef902c5f7e

View File

@ -3747,6 +3747,9 @@ static void p2p_device_probe_cb(const struct mmpdu_header *mpdu,
*/
peer->device_addr = bss->addr;
if (!dev->peer_list)
dev->peer_list = l_queue_new();
if (!p2p_device_peer_add(dev, peer))
p2p_peer_free(peer);