Fix DETACH command debug prints to avoid use of freed memory
authorJouni Malinen <j@w1.fi>
Sat, 24 Aug 2013 20:31:06 +0000 (23:31 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 24 Aug 2013 20:31:06 +0000 (23:31 +0300)
commita235aca316a8a4729735fecb00f7d7775b38d993
tree31839539cf88cef9c7317a7e897a259a2e098643
parentd011246f792ac2caebb679ca7ec34408fb2c3eab
Fix DETACH command debug prints to avoid use of freed memory

In case a control interface socket is detached because of sendmsg()
failing for the socket, function call to detach the socket uses a
pointer to the socket information in the structure to be freed. Reorder
code to print socket info before freeing the data to avoid use of freed
memory in case debug prints are enabled.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface_udp.c
wpa_supplicant/ctrl_iface_unix.c