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

p2p: Initialize dev->discovery_users in p2p_device_request_discovery

Make sure dev->discovery_users points at a queue before we try adding
user records to it.
This commit is contained in:
Andrew Zaborowski 2020-07-11 03:00:38 +02:00 committed by Denis Kenzior
parent 7d3092e1ca
commit 09c9482045

View File

@ -3416,6 +3416,9 @@ static struct l_dbus_message *p2p_device_request_discovery(struct l_dbus *dbus,
l_dbus_message_get_sender(message)))
return dbus_error_already_exists(message);
if (!dev->discovery_users)
dev->discovery_users = l_queue_new();
user = l_new(struct p2p_discovery_user, 1);
user->client = l_strdup(l_dbus_message_get_sender(message));
user->dev = dev;