mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 13:09:04 -04:00
qcacmn: Free memory for ppdu descriptor tlv list in detach path
ppdu tlvs are maintained in linked list and was not freed in detach path but only freed after wdi post message. This was causing memory leak to happen Change-Id: I7b7b49d7ec829a6ef6b99edb1c7999bed713ae49
This commit is contained in:
parent
bcfa6d8683
commit
cf526b7b9f
1 changed files with 22 additions and 0 deletions
|
|
@ -2702,6 +2702,26 @@ static void dp_neighbour_peers_detach(struct dp_pdev *pdev)
|
|||
qdf_spinlock_destroy(&pdev->neighbour_peer_mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_htt_ppdu_stats_detach() - detach stats resources
|
||||
* @pdev: Datapath PDEV handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void dp_htt_ppdu_stats_detach(struct dp_pdev *pdev)
|
||||
{
|
||||
struct ppdu_info *ppdu_info, *ppdu_info_next;
|
||||
|
||||
TAILQ_FOREACH_SAFE(ppdu_info, &pdev->ppdu_info_list,
|
||||
ppdu_info_list_elem, ppdu_info_next) {
|
||||
if (!ppdu_info)
|
||||
break;
|
||||
qdf_assert_always(ppdu_info->nbuf);
|
||||
qdf_nbuf_free(ppdu_info->nbuf);
|
||||
qdf_mem_free(ppdu_info);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_pdev_detach_wifi3() - detach txrx pdev
|
||||
* @txrx_pdev: Datapath PDEV handle
|
||||
|
|
@ -2773,6 +2793,8 @@ static void dp_pdev_detach_wifi3(struct cdp_pdev *txrx_pdev, int force)
|
|||
curr_nbuf = next_nbuf;
|
||||
}
|
||||
|
||||
dp_htt_ppdu_stats_detach(pdev);
|
||||
|
||||
soc->pdev_list[pdev->pdev_id] = NULL;
|
||||
soc->pdev_count--;
|
||||
wlan_cfg_pdev_detach(pdev->wlan_cfg_ctx);
|
||||
|
|
|
|||
Loading…
Reference in a new issue