Sfoglia il codice sorgente

qcacld-3.0: Fix incorrect NULL pointer check for SME

Propagate from qcacld-2.0 to qcacld-3.0

Currently there are some places where array name is compared to NULL
in SME. Add fix to correct it.

CRs-Fixed: 1063255
Change-Id: Id37e8b6fc483d41c4e5b48bb78c295acc08a0328
Yingying Tang 8 anni fa
parent
commit
d566107c90
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      core/sme/src/common/sme_ft_api.c
  2. 1 1
      core/sme/src/csr/csr_api_roam.c

+ 1 - 1
core/sme/src/common/sme_ft_api.c

@@ -301,7 +301,7 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id,
 	keymaterial->key[0].paeRole = ftkey_info->paeRole;
 	keymaterial->key[0].keyLength = ftkey_info->keyLength;
 
-	if (ftkey_info->keyLength && ftkey_info->Key) {
+	if (ftkey_info->keyLength) {
 		qdf_mem_copy(&keymaterial->key[0].key, ftkey_info->Key,
 				ftkey_info->keyLength);
 		if (ftkey_info->keyLength == 16) {

+ 1 - 1
core/sme/src/csr/csr_api_roam.c

@@ -7432,7 +7432,7 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac,
 	pDstProfile->BSSIDs.numOfBSSIDs = 1;
 	qdf_copy_macaddr(pDstProfile->BSSIDs.bssid, &pSrcProfile->bssid);
 
-	if (pSrcProfile->SSID.ssId) {
+	if (pSrcProfile->SSID.length > 0) {
 		pDstProfile->SSIDs.SSIDList =
 			qdf_mem_malloc(sizeof(tCsrSSIDInfo));
 		if (NULL == pDstProfile->SSIDs.SSIDList) {