WPS: Fix current_ssid clearing on duplicate network removal
authorJouni Malinen <j@w1.fi>
Sun, 30 Nov 2014 13:48:37 +0000 (15:48 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 30 Nov 2014 13:53:11 +0000 (15:53 +0200)
commit4f9a5ea5ccac9ee4f7664e5368a8148e23f04051
tree82d0bdef89b40cb0ba2518c2188f8d44ef0b805a
parente4a35f07d9da7671be35639e0c6da8b4565e8b3a
WPS: Fix current_ssid clearing on duplicate network removal

It was possible for the current network profile to be deleted when
merging duplicated WPS credentials. However, this did not clear
wpa_s->current_ssid and it was possible for something else to end up
dereferencing that pointer to now freed memory. This could be hit, e.g.,
with ap_wps_mixed_cred. Fix this by clearing current_ssid also in this
code path similarly to other cases of network block getting removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/wps_supplicant.c