ath11k: fix possible mem leak in extd tx stats
PATCH 1/1 ath11k: fix possible mem leak in extd tx stats
This patch fix the memory leak in extd tx stats.
Signed-off-by Venkateswara Naralasetty <[email protected]>
--- drivers/net/wireless/ath/ath11k/mac.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +5 -3
@@ -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 ;
Signature · 7 lines
2.7.4 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 4 lines · Venkateswara Naralasetty
This patch fix the memory leak in extd tx stats.
Signed-off-by Venkateswara Naralasetty <[email protected]>Signed-off-by Kalle Valo <[email protected]>
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
Signature · 9 lines
https://patchwork.kernel.org/patch/11008437/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k