All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k: release allocated buffer if timed out
@ 2019-09-06 18:59 Navid Emamdoost
  2019-09-10 13:32 ` Kalle Valo
  2020-05-12 16:56 ` Brian Norris
  0 siblings, 2 replies; 9+ messages in thread
From: Navid Emamdoost @ 2019-09-06 18:59 UTC (permalink / raw)
  Cc: emamd001, smccaman, kjlu, Navid Emamdoost, QCA ath9k Development,
	Kalle Valo, David S. Miller, linux-wireless, netdev,
	linux-kernel

In ath9k_wmi_cmd, the allocated network buffer needs to be released
if timeout happens. Otherwise memory will be leaked.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
 drivers/net/wireless/ath/ath9k/wmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index d1f6710ca63b..cdc146091194 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -336,6 +336,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 		ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
 			wmi_cmd_to_name(cmd_id));
 		mutex_unlock(&wmi->op_mutex);
+		kfree_skb(skb);
 		return -ETIMEDOUT;
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-22 10:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 18:59 [PATCH] ath9k: release allocated buffer if timed out Navid Emamdoost
2019-09-10 13:32 ` Kalle Valo
2020-05-12 16:56 ` Brian Norris
2020-05-13  3:24   ` Navid Emamdoost
2020-05-13 19:12     ` Brian Norris
2020-05-13  7:05   ` Kalle Valo
2020-05-13 19:02     ` Brian Norris
2020-05-20 20:59       ` Brian Norris
2020-05-22 10:34         ` 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.