Skip to content

Commit

Permalink
mac802154: fixed potential skb leak with mac802154_parse_frame_start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Townsend authored and Marcel Holtmann committed Aug 19, 2014
1 parent 77b2f28 commit 7629d1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mac802154/wpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ void mac802154_wpans_rx(struct mac802154_priv *priv, struct sk_buff *skb)
ret = mac802154_parse_frame_start(skb, &hdr);
if (ret) {
pr_debug("got invalid frame\n");
kfree_skb(skb);
return;
}

Expand Down

0 comments on commit 7629d1e

Please sign in to comment.