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
This commit is contained in:
Krunal Soni
2018-02-26 14:36:30 -08:00
committed by snandini
parent 279ab101bc
commit 3cf1f1cef6

View File

@@ -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++) {