Fix hostapd error path regression
Commit 354c903f8e
added setting of
driver_ap_teardown on the hostapd exit path without taking into account
that this may also be called on an error path where the interface has
not been initialized. Fix the resulting NULL pointer dereference to
allow hostapd to exit cleanly in error case.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
c16a7590cf
commit
49021c1cb6
1 changed files with 2 additions and 0 deletions
|
@ -729,6 +729,8 @@ int main(int argc, char *argv[])
|
||||||
hostapd_global_ctrl_iface_deinit(&interfaces);
|
hostapd_global_ctrl_iface_deinit(&interfaces);
|
||||||
/* Deinitialize all interfaces */
|
/* Deinitialize all interfaces */
|
||||||
for (i = 0; i < interfaces.count; i++) {
|
for (i = 0; i < interfaces.count; i++) {
|
||||||
|
if (!interfaces.iface[i])
|
||||||
|
continue;
|
||||||
interfaces.iface[i]->driver_ap_teardown =
|
interfaces.iface[i]->driver_ap_teardown =
|
||||||
!!(interfaces.iface[i]->drv_flags &
|
!!(interfaces.iface[i]->drv_flags &
|
||||||
WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT);
|
WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT);
|
||||||
|
|
Loading…
Reference in a new issue