hostapd: Prevent double interface disabling from segfaulting
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 28 May 2014 09:57:10 +0000 (11:57 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 31 May 2014 12:46:45 +0000 (15:46 +0300)
commit3fbd036ea99ec73b48ddb48fd796f701675f6597
tree65f5d1fac7ca28b1defc4af74db1a7f649081bc3
parentea39367c1bbebad5af646b3dc7932483b63e8151
hostapd: Prevent double interface disabling from segfaulting

Performing, e.g. `wpa_cli -p /var/run/hostapd raw DISABLE` twice led to
hostapd segmentation fault if multiple BSSes were configured. Fix this
by checking if there is anything to disable at all before trying.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
src/ap/hostapd.c