mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
hwsim: check pending_create_msg before replying
In the NEW_RADIO callback hwsim was assuming that DBus had no yet replied to the Create() method. In some cases the NEW_RADIO event fires before the actual callback which will respond to DBus. This causes a crash in the create callback.
This commit is contained in:
parent
554a78fbf0
commit
799ab03f59
@ -1579,7 +1579,7 @@ static void radio_manager_create_callback(struct l_genl_msg *msg,
|
||||
*/
|
||||
radio = l_queue_find(radio_info, radio_info_match_id,
|
||||
L_UINT_TO_PTR(pending_create_radio_id));
|
||||
if (radio) {
|
||||
if (radio && pending_create_msg) {
|
||||
const char *path = radio_get_path(radio);
|
||||
|
||||
reply = l_dbus_message_new_method_return(pending_create_msg);
|
||||
|
Loading…
Reference in New Issue
Block a user