Browse Source

qcacld-3.0: Initialize save_peer_id_ref_cnt array with default value

One of the arrays defined in data-path's API is not initialized
and this API assumes that subsequent loop will fill up the array to
correct default value. This assumption is wrong.

Intialize the array "save_peer_id_ref_cnt" in API
"ol_txrx_peer_remove_obj_map_entries" to default value "0" to avoid
any issue.

CRs-Fixed: 2196084
Change-Id: If0080708662fc44e6583823717798a9f505ec1d0
Krunal Soni 7 years ago
parent
commit
3cf1f1cef6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/dp/txrx/ol_txrx_peer_find.c

+ 1 - 1
core/dp/txrx/ol_txrx_peer_find.c

@@ -684,7 +684,7 @@ void ol_txrx_peer_remove_obj_map_entries(ol_txrx_pdev_handle pdev,
 	int32_t peer_id_ref_cnt;
 	int32_t num_deleted_maps = 0;
 	uint16_t save_peer_ids[MAX_NUM_PEER_ID_PER_PEER];
-	uint16_t save_peer_id_ref_cnt[MAX_NUM_PEER_ID_PER_PEER];
+	uint16_t save_peer_id_ref_cnt[MAX_NUM_PEER_ID_PER_PEER] = {0};
 
 	qdf_spin_lock_bh(&pdev->peer_map_unmap_lock);
 	for (i = 0; i < MAX_NUM_PEER_ID_PER_PEER; i++) {