From 89697c49b0943620d74e17d80795600c1b1a28e3 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Tue, 19 Jul 2016 09:26:15 -0700 Subject: [PATCH] qcacld-3.0: Fix possible uninitialized variable access in wma_add_bss_sta_mode In function wma_add_bss_sta_mode, variable "peer" is not initialized. Possibly we may pass this variable to wma_remove_peer function as is and that can be dereferenced inside wma_remove_peer function. So initialize peer with NULL to avoid dereferencing uninitialized variable. Change-Id: Ibc484759b5e92052a3500137464e47287ccad939 CRs-Fixed: 1042968 --- core/wma/src/wma_dev_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index f43ead6a6b5e..d43a1ddf579f 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2977,7 +2977,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) struct wma_vdev_start_req req; struct wma_target_req *msg; uint8_t vdev_id, peer_id; - ol_txrx_peer_handle peer; + ol_txrx_peer_handle peer = NULL; QDF_STATUS status; struct wma_txrx_node *iface; int pps_val = 0;