diff --git a/src/netdev.c b/src/netdev.c index cda0c7fc..bac6860c 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -838,6 +838,11 @@ static void netdev_connect_free(struct netdev *netdev) netdev->disconnect_cmd_id = 0; } + if (netdev->get_oci_cmd_id) { + l_genl_family_cancel(nl80211, netdev->get_oci_cmd_id); + netdev->get_oci_cmd_id = 0; + } + if (netdev->ft_ds_list) { l_queue_destroy(netdev->ft_ds_list, netdev_ft_ds_entry_free); netdev->ft_ds_list = NULL; @@ -949,11 +954,6 @@ static void netdev_free(void *data) netdev->get_station_cmd_id = 0; } - if (netdev->get_oci_cmd_id) { - l_genl_family_cancel(nl80211, netdev->get_oci_cmd_id); - netdev->get_oci_cmd_id = 0; - } - if (netdev->fw_roam_bss) scan_bss_free(netdev->fw_roam_bss);