* [PATCH] ath11k: fix possible mem leak in extd tx stats
@ 2019-06-21 5:13 Venkateswara Naralasetty
2019-06-24 10:55 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Venkateswara Naralasetty @ 2019-06-21 5:13 UTC (permalink / raw)
To: ath11k; +Cc: Venkateswara Naralasetty
This patch fix the memory leak in extd tx stats.
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index c1e9c34..586c725 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2597,8 +2597,10 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
if (ath11k_debug_is_extd_tx_stats_enabled(ar)) {
arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
GFP_KERNEL);
- if (!arsta->tx_stats)
+ if (!arsta->tx_stats) {
+ ret = -ENOMEM;
goto exit;
+ }
}
if (ieee80211_vif_is_mesh(vif)) {
@@ -2634,8 +2636,8 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
ath11k_mac_dec_num_stations(arvif, sta);
- if (ath11k_debug_is_extd_tx_stats_enabled(ar))
- kfree(arsta->tx_stats);
+ kfree(arsta->tx_stats);
+ arsta->tx_stats = NULL;
kfree(arsta->rx_stats);
arsta->rx_stats = NULL;
--
2.7.4
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix possible mem leak in extd tx stats
2019-06-21 5:13 [PATCH] ath11k: fix possible mem leak in extd tx stats Venkateswara Naralasetty
@ 2019-06-24 10:55 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-06-24 10:55 UTC (permalink / raw)
To: Venkateswara Naralasetty; +Cc: ath11k
Venkateswara Naralasetty <vnaralas@codeaurora.org> wrote:
> This patch fix the memory leak in extd tx stats.
>
> Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2 patches applied to ath11k-bringup branch of ath.git, thanks.
a3ba6e2f28a5 ath11k: fix possible mem leak in extd tx stats
b9e30f01194c ath11k: fix line over 90 characters warnings
--
https://patchwork.kernel.org/patch/11008437/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-24 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-21 5:13 [PATCH] ath11k: fix possible mem leak in extd tx stats Venkateswara Naralasetty
2019-06-24 10:55 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.