]> git.ipfire.org Git - thirdparty/hostap.git/commit
hostapd: Fix DETACH command debug prints to avoid use of freed memory
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 5 Nov 2013 23:15:28 +0000 (01:15 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 5 Nov 2013 23:15:28 +0000 (01:15 +0200)
commit8540e0b520062e95e42f8e213b12f8a2f552b22c
treed17fff6c779c9fee959c802de109a074e5fba96b
parent742117ad880757ec298751cabdc789db99a49112
hostapd: 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.

This is similar to the earlier wpa_supplicant fix in commit
a235aca316a8a4729735fecb00f7d7775b38d993.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd/ctrl_iface.c