Skip to content

Commit 7629d1e

Browse files
Martin Townsendholtmann
authored andcommitted
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 <[email protected]> Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 77b2f28 commit 7629d1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/mac802154/wpan.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ void mac802154_wpans_rx(struct mac802154_priv *priv, struct sk_buff *skb)
573573
ret = mac802154_parse_frame_start(skb, &hdr);
574574
if (ret) {
575575
pr_debug("got invalid frame\n");
576+
kfree_skb(skb);
576577
return;
577578
}
578579

0 commit comments

Comments
 (0)