[PATCH] libertas: don't leak skb on receive error

Philip Rakity prakity at yahoo.com
Tue Apr 7 15:41:17 EDT 2009



Don't lead memory when receive errors 
Signed-off-by: Philip Rakity <prakity at yahoo.com>

--- linux-2.6.29/drivers/net/wireless/libertas/rx.c.old    2009-04-01 13:19:26.000000000 -0700
+++ linux-2.6.29/drivers/net/wireless/libertas/rx.c    2009-04-01 13:19:57.000000000 -0700
@@ -170,6 +170,7 @@
         lbs_deb_rx("rx err: frame received with bad length\n");
         priv->stats.rx_length_errors++;
         ret = 0;
+        dev_kfree_skb(skb);
         goto done;
     }
 
@@ -181,6 +182,7 @@
         lbs_pr_alert("rxpd not ok\n");
         priv->stats.rx_errors++;
         ret = 0;
+        dev_kfree_skb(skb);
         goto done;



      



More information about the libertas-dev mailing list