]> git.ipfire.org Git - thirdparty/hostap.git/commit
ACS: Be more consistent with iface->current_mode checks
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 7 Jan 2016 14:39:10 +0000 (16:39 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 7 Jan 2016 14:39:10 +0000 (16:39 +0200)
commita95cc47a929cb84bfc47497118f1f032043c1502
tree84a1ce467b59c0fd74ffacf73e7b09515882e930
parent6014e59c08160eb0761c96d6fa791629c9317387
ACS: Be more consistent with iface->current_mode checks

Offloading of ACS to the driver changed the design a bit in a way that
iface->current_mode could actually be NULL when the offloaded ACS
mechanism supports band selection in addition to channel selection. This
resulted in a combination that is too complex for static analyzers to
notice. While acs_init() can be called with iface->current_mode == NULL
that is only in the case where WPA_DRIVER_FLAGS_ACS_OFFLOAD is in use.
In other words, the actual ACS functions like acs_cleanup() that would
dereference iface->current_mode are not used in such a case.

Get rid of static analyzer warnings by explicitly checking
iface->current_mode in acs_init() for the case where ACS offloading is
not used.

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