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
This commit is contained in:
Arif Hussain 2016-07-19 09:26:15 -07:00 • committed by Vishwajith Upendra
commit 89697c49b0

View file

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