[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1357098567-8558-1-git-send-email-Larry.Finger@lwfinger.net>
Date: Tue, 1 Jan 2013 21:49:27 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: linville@...driver.com
Cc: linux-wireless@...r.kernel.org,
Larry Finger <Larry.Finger@...inger.net>,
netdev@...r.kernel.org, Stable <stable@...r.kernel.org>,
"Luis R. Rodriguez" <mcgrof@....qualcomm.com>,
Vasanthakumar Thiagarajan <vthiagar@....qualcomm.com>,
Senthil Balasubramanian <senthilb@....qualcomm.com>,
ath9k-devel@...ts.ath9k.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ath9k_htc: Fix skb leaks
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 <Larry.Finger@...inger.net>
Cc: Stable <stable@...r.kernel.org>
Cc: "Luis R. Rodriguez" <mcgrof@....qualcomm.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@....qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@....qualcomm.com>
Cc: linux-wireless@...r.kernel.org
Cc: ath9k-devel@...ts.ath9k.org
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists