From a60672fa1cd2c4bfeea229a2e2968fe2b5f27fbd Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Wed, 18 Nov 2015 17:29:12 +0530 Subject: [PATCH] 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 --- core/wma/src/wma_mgmt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 10011aa2f2f3..b85b51a9faef 100644 --- a/core/wma/src/wma_mgmt.c +++ b/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);