mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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>
This commit is contained in:
parent
47afbaf5af
commit
f54930f363
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user