qcacld-3.0: Check acs cfg channel list before access

Currently the driver does not check whether the
ACS cfg's chanel list is valid or not and checks
for the best channel within it in the function
wlansap_is_channel_present_in_acs_list, which can
lead to potential pointer deference.

Fix is to check the channel list and then only
process for comparison.

Change-Id: Icda2e7c8f260eb636c8159fbbb697400dddbdf74
CRs-Fixed: 2479941
2 files changed