summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/rx.c
diff options
context:
space:
mode:
authorPhilip Rakity <prakity@yahoo.com>2009-04-07 21:41:17 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-04-16 16:39:08 +0200
commitf54930f363113a9357c9ae008965b6484a61cd29 (patch)
tree821aa39cc09d2ec0af92f1df4277bab309ef90f5 /drivers/net/wireless/libertas/rx.c
parentmac80211: correct wext transmit power handler (diff)
downloadlinux-f54930f363113a9357c9ae008965b6484a61cd29.tar.xz
linux-f54930f363113a9357c9ae008965b6484a61cd29.zip
libertas: don't leak skb on receive error
Don't lead memory when receive errors Signed-off-by: Philip Rakity <prakity@yahoo.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/rx.c')
-rw-r--r--drivers/net/wireless/libertas/rx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 63d7e19ce9bd..8e669775cb5d 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -170,6 +170,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
lbs_deb_rx("rx err: frame received with bad length\n");
dev->stats.rx_length_errors++;
ret = 0;
+ dev_kfree_skb(skb);
goto done;
}
@@ -181,6 +182,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
lbs_pr_alert("rxpd not ok\n");
dev->stats.rx_errors++;
ret = 0;
+ dev_kfree_skb(skb);
goto done;
}