Commit f54930f3 authored by Philip Rakity's avatar Philip Rakity Committed by John W. Linville
Browse files

libertas: don't leak skb on receive error



Don't lead memory when receive errors
Signed-off-by: default avatarPhilip Rakity <prakity@yahoo.com>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 47afbaf5
...@@ -170,6 +170,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) ...@@ -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"); lbs_deb_rx("rx err: frame received with bad length\n");
dev->stats.rx_length_errors++; dev->stats.rx_length_errors++;
ret = 0; ret = 0;
dev_kfree_skb(skb);
goto done; goto done;
} }
...@@ -181,6 +182,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) ...@@ -181,6 +182,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
lbs_pr_alert("rxpd not ok\n"); lbs_pr_alert("rxpd not ok\n");
dev->stats.rx_errors++; dev->stats.rx_errors++;
ret = 0; ret = 0;
dev_kfree_skb(skb);
goto done; goto done;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment