qcacld-3.0: Avoid issue that NULL constant is dereferenced

NULL constant is unsuitable for sapEvent parameter since following
may be called:
        sapEventInit(sapEvent);
        vosStatus = sapFsm(sapContext, sapEvent);

Change-Id: I2ffc1be27f96bcbd793b2302e6c5920b5d30073b
CRs-Fixed: 2111290
This commit is contained in:
Zhu Jianmin
2017-09-07 13:33:50 +08:00
committed by snandini
parent 794fdfce82
commit 62e119634c

View File

@@ -3207,6 +3207,7 @@ wlansap_acs_chselect(void *pvos_gctx,
tHalHandle h_hal = NULL;
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
tpAniSirGlobal pmac = NULL;
tWLAN_SAPEvent sapEvent; /* State machine event */
sap_context = CDS_GET_SAP_CB(pvos_gctx);
if (NULL == sap_context) {
@@ -3258,7 +3259,7 @@ wlansap_acs_chselect(void *pvos_gctx,
* different scan callback fucntion to process
* the results pre start BSS.
*/
qdf_status = sap_goto_channel_sel(sap_context, NULL, true, false);
qdf_status = sap_goto_channel_sel(sap_context, &sapEvent, true, false);
if (QDF_STATUS_E_ABORTED == qdf_status) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,