wpa_supplicant: Fix crash when terminating all interfaces
authorMoshe Benji <Moshe.Benji@intel.com>
Sun, 15 Dec 2013 08:50:07 +0000 (10:50 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 24 Dec 2013 06:29:28 +0000 (08:29 +0200)
commitab41595f3524e397107c82213ed5b1cac8ce09bf
tree0688087070cf8b84df734166d1593d87e3c8b2c5
parent76aab0305c1f2f5871bf936d562ac7e1fa17c7f0
wpa_supplicant: Fix crash when terminating all interfaces

In wpa_supplicant_terminate_proc(), while iterating and
terminating interfaces, after an interface is terminated,
we can no longer access its memory as it is no longer valid
and causes a crash.

Fix this by saving the pointer to the next interface before freeing
the current one to avoid accessing an invalid memory location.

Signed-hostap: Moshe Benji <moshe.benji@intel.com>
wpa_supplicant/wpa_supplicant.c