mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
mac802154: fixed potential skb leak with mac802154_parse_frame_start
This patch fix a memory leak if received frame was not able to parse. Signed-off-by: Martin Townsend <martin.townsend@xsilon.com> Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
77b2f28659
commit
7629d1eaf3
1 changed files with 1 additions and 0 deletions
|
@ -573,6 +573,7 @@ void mac802154_wpans_rx(struct mac802154_priv *priv, struct sk_buff *skb)
|
||||||
ret = mac802154_parse_frame_start(skb, &hdr);
|
ret = mac802154_parse_frame_start(skb, &hdr);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_debug("got invalid frame\n");
|
pr_debug("got invalid frame\n");
|
||||||
|
kfree_skb(skb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue