Thread (6 messages) 6 messages, 2 authors, 2013-01-09
STALE4927d

[PATCH] ath9k_htc: Fix skb leaks

From: Larry Finger <hidden>
Date: 2013-01-02 03:49:59
Also in: linux-wireless, lkml, stable
Subsystem: atheros ath generic utilities, qualcomm atheros ath9k wireless driver, the rest · Maintainers: Jeff Johnson, Toke Høiland-Jørgensen, Linus Torvalds

Running with kmemleak shows that this driver leaks every skb allocated in
routine htc_connect_service() whether the service connection succeeds or
fails.

Signed-off-by: Larry Finger <redacted>
Cc: Stable <redacted>
Cc: "Luis R. Rodriguez" <redacted>
Cc: Vasanthakumar Thiagarajan <redacted>
Cc: Senthil Balasubramanian <redacted>
Cc: linux-wireless@vger.kernel.org
Cc: ath9k-devel@lists.ath9k.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/wireless/ath/ath9k/htc_hst.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 4a9570d..a304748 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -278,10 +278,12 @@ int htc_connect_service(struct htc_target *target,
 	if (!time_left) {
 		dev_err(target->dev, "Service connection timeout for: %d\n",
 			service_connreq->service_id);
-		return -ETIMEDOUT;
+		ret = -ETIMEDOUT;
+		goto err;
 	}
 
 	*conn_rsp_epid = target->conn_rsp_epid;
+	kfree_skb(skb);
 	return 0;
 err:
 	kfree_skb(skb);
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help