소스 검색

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
Zhu Jianmin 7 년 전
부모
커밋
62e119634c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      core/sap/src/sap_module.c

+ 2 - 1
core/sap/src/sap_module.c

@@ -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,