Initialize hapd->nr_db in hostapd_alloc_bss_data()
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 19 Aug 2016 13:29:22 +0000 (16:29 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 22 Aug 2016 14:44:05 +0000 (17:44 +0300)
commitf2f8616e806f90afed0e308a85088df4d4a9f349
tree4909d961bb1a413f8d79b4e2907f670276fec5e8
parent30e0745bf7e7c302d5e0977c805b6f07ac2f3d2b
Initialize hapd->nr_db in hostapd_alloc_bss_data()

Previously, this was initialized in hostapd_setup_bss() which made it
possible for a REMOVE_NEIGHBOR control interface command to be issued
prior to the list head pointers having been set. That resulted in a NULL
pointer dereference. Fix this by initializing the list head at the time
the data structure gets allocated.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/hostapd.c
wpa_supplicant/mesh.c