[PATCH] Avoid double free(p2p->after_scan_tx) in p2p_deinit()

MAYANK HAARIT mayank.h at samsung.com
Fri Jul 1 00:42:35 PDT 2016


As p2p->after_scan_tx is already freeing in p2p_flush() , Although p2p->after_scan_tx is assigning to NULL in p2p_flush() . So double free in p2p_deinit() is dead code.

Signed-off-by: Mayank Haarit 
---
src/p2p/p2p.c |    1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index a209a56..f2b891b 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2980,7 +2980,6 @@ void p2p_deinit(struct p2p_data *p2p)
        os_free(p2p->groups);
        p2ps_prov_free(p2p);
        wpabuf_free(p2p->sd_resp);
-       os_free(p2p->after_scan_tx);
        p2p_remove_wps_vendor_extensions(p2p);
        os_free(p2p->no_go_freq.range);
        p2p_service_flush_asp(p2p);
--
1.7.0.4


More information about the Hostap mailing list