3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

hwsim: Invoke l_queue_remove prior to object deletion

While the current code is quite safe, the new ordering makes more
logical sense and doesn't confuse static analysis tools.
This commit is contained in:
Denis Kenzior 2019-10-17 13:03:08 -05:00
parent c8247c3754
commit b6554ee41c

View File

@ -914,8 +914,8 @@ static void del_radio_event(struct l_genl_msg *msg)
l_queue_foreach_remove(interface_info, interface_info_destroy_by_radio, l_queue_foreach_remove(interface_info, interface_info_destroy_by_radio,
radio); radio);
l_dbus_unregister_object(dbus, radio_get_path(radio)); l_dbus_unregister_object(dbus, radio_get_path(radio));
radio_free(radio);
l_queue_remove(radio_info, radio); l_queue_remove(radio_info, radio);
radio_free(radio);
} }
static void del_interface_event(struct l_genl_msg *msg) static void del_interface_event(struct l_genl_msg *msg)
@ -949,8 +949,8 @@ static void del_interface_event(struct l_genl_msg *msg)
return; return;
l_dbus_unregister_object(dbus, interface_get_path(interface)); l_dbus_unregister_object(dbus, interface_get_path(interface));
interface_free(interface);
l_queue_remove(interface_info, interface); l_queue_remove(interface_info, interface);
interface_free(interface);
} }
static void hwsim_config(struct l_genl_msg *msg, void *user_data) static void hwsim_config(struct l_genl_msg *msg, void *user_data)