mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-16 23:40:43 +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:
parent
520ad56f83
commit
ef902c5f7e
@ -3747,6 +3747,9 @@ static void p2p_device_probe_cb(const struct mmpdu_header *mpdu,
|
|||||||
*/
|
*/
|
||||||
peer->device_addr = bss->addr;
|
peer->device_addr = bss->addr;
|
||||||
|
|
||||||
|
if (!dev->peer_list)
|
||||||
|
dev->peer_list = l_queue_new();
|
||||||
|
|
||||||
if (!p2p_device_peer_add(dev, peer))
|
if (!p2p_device_peer_add(dev, peer))
|
||||||
p2p_peer_free(peer);
|
p2p_peer_free(peer);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user