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

Jouni Malinen j at w1.fi
Fri Jul 1 11:02:21 PDT 2016

On Fri, Jul 01, 2016 at 07:42:35AM +0000, MAYANK HAARIT wrote:
> 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.

"Double free" is normally used to refer to a critical security
vulnerability. What you describe here is no such thing. p2p_flush()
clearly resets the pointer to NULL and there is no double freeing of
anything here. As such, this commit log is really misleading and should
be reworded as doing cleanup by removing unnecessary os_free() call.

> Signed-off-by: Mayank Haarit 

The Signed-off-by: line needs to include an email address as described
in the top level CONTRIBUTIONS file.
Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list