P2P: Fix memory leak with driver-based P2P management
If the P2P management operations are handled within the driver, the P2P service entries were not freed when terminating wpa_supplicant. Fix this by calling wpas_p2p_service_flush() even if the P2P module within wpa_supplicant has not been initialized. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
1e05192eec
commit
bf428a739c
1 changed files with 4 additions and 3 deletions
|
@ -2641,13 +2641,14 @@ void wpas_p2p_deinit_global(struct wpa_global *global)
|
||||||
{
|
{
|
||||||
struct wpa_supplicant *wpa_s, *tmp;
|
struct wpa_supplicant *wpa_s, *tmp;
|
||||||
|
|
||||||
|
wpa_s = global->ifaces;
|
||||||
|
if (wpa_s)
|
||||||
|
wpas_p2p_service_flush(wpa_s);
|
||||||
|
|
||||||
if (global->p2p == NULL)
|
if (global->p2p == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Remove remaining P2P group interfaces */
|
/* Remove remaining P2P group interfaces */
|
||||||
wpa_s = global->ifaces;
|
|
||||||
if (wpa_s)
|
|
||||||
wpas_p2p_service_flush(wpa_s);
|
|
||||||
while (wpa_s && wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE)
|
while (wpa_s && wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE)
|
||||||
wpa_s = wpa_s->next;
|
wpa_s = wpa_s->next;
|
||||||
while (wpa_s) {
|
while (wpa_s) {
|
||||||
|
|
Loading…
Reference in a new issue