P2P: Disconnect P2P group on supplicant deinit
When a supplicant is deinited and shutting, disconnect from P2P groups. This fixes a memory leak on variable dbus_groupobj_path on exiting supplicant. Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com> Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
This commit is contained in:
parent
eb6f8c2bd4
commit
103b8f4dea
1 changed files with 2 additions and 6 deletions
|
@ -2479,7 +2479,6 @@ void wpas_p2p_deinit(struct wpa_supplicant *wpa_s)
|
||||||
void wpas_p2p_deinit_global(struct wpa_global *global)
|
void wpas_p2p_deinit_global(struct wpa_global *global)
|
||||||
{
|
{
|
||||||
struct wpa_supplicant *wpa_s, *tmp;
|
struct wpa_supplicant *wpa_s, *tmp;
|
||||||
char *ifname;
|
|
||||||
|
|
||||||
if (global->p2p == NULL)
|
if (global->p2p == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -2500,12 +2499,9 @@ void wpas_p2p_deinit_global(struct wpa_global *global)
|
||||||
}
|
}
|
||||||
if (tmp == NULL)
|
if (tmp == NULL)
|
||||||
break;
|
break;
|
||||||
ifname = os_strdup(tmp->ifname);
|
|
||||||
type = wpas_p2p_if_type(tmp->p2p_group_interface);
|
type = wpas_p2p_if_type(tmp->p2p_group_interface);
|
||||||
wpa_supplicant_remove_iface(global, tmp, 0);
|
/* Disconnect from the P2P group and deinit the interface */
|
||||||
if (ifname)
|
wpas_p2p_disconnect(tmp);
|
||||||
wpa_drv_if_remove(wpa_s, type, ifname);
|
|
||||||
os_free(ifname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue