Clean up hostapd add_iface error path operations
authorJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 13:29:26 +0000 (15:29 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 15:15:12 +0000 (17:15 +0200)
commit7b6e81575f410a24549fd52b4aa4f458bb1ec133
tree3f969b16771e46d64820f5613ed9f7da2b60c94a
parent67adcd266c4ef3f9356190ef2c0727303f9532cb
Clean up hostapd add_iface error path operations

If hapd_iface->bss[i] == NULL, this could have resulted in NULL pointer
dereference in the debug print. Avoid this by skipping the message in
case of NULL pointer. In addition, clear iface->bss[i] to NULL for
additional robustness even though this array gets freed immediately.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/hostapd.c