hostapd: Fix WPA, IEEE 802.1X, and WPS deinit in cases where init fails
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 13 Oct 2015 20:35:00 +0000 (23:35 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 14 Oct 2015 15:42:07 +0000 (18:42 +0300)
commit1b822f52e6356e78938f285d511d458e202fbc76
tree452d742568a93d3b2eebe62490f0eb7a22c23637
parent4150c7c97c3de10ced627eb26edfb45970795f82
hostapd: Fix WPA, IEEE 802.1X, and WPS deinit in cases where init fails

With driver wrappers that implement set_privacy(), set_generic_elem(),
set_ieee8021x(), or set_ap_wps_ie(), it was possible to hit a NULL
pointer dereference in error cases where interface setup failed and
the network configuration used WPA/WPA2, IEEE 802.1X, or WPS.

Fix this by skipping the driver operations in case the driver interface
is not initialized.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/ieee802_1x.c
src/ap/wpa_auth_glue.c
src/ap/wps_hostapd.c