Ver Fonte

qcacld-3.0: Fix static code analysis errors

qcacld-2.0 to qcacld-3.0 propagation

Updated the wma, htt modules to address the
issues reported by static code analysis.

CRs-Fixed: 933728
Change-Id: I3437f7d9a12475f4a854412d9f34f48ed7553848
Govind Singh há 9 anos atrás
pai
commit
e55e699ade
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      core/wma/src/wma_mgmt.c

+ 9 - 0
core/wma/src/wma_mgmt.c

@@ -651,6 +651,15 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
 		       WMITLV_GET_STRUCT_TLVLEN(WMI_STA_KEEPALVE_ARP_RESPONSE));
 
 	if (method == SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP) {
+		if ((NULL == hostv4addr) ||
+			(NULL == destv4addr) ||
+			(NULL == destmac)) {
+			WMA_LOGE("%s: received null pointer, hostv4addr:%p "
+			   "destv4addr:%p destmac:%p ", __func__,
+			   hostv4addr, destv4addr, destmac);
+			cdf_nbuf_free(buf);
+			return;
+		}
 		cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE;
 		cdf_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr,
 			     SIR_IPV4_ADDR_LEN);