From: Martin Townsend Date: Tue, 19 Aug 2014 17:03:28 +0000 (+0200) Subject: mac802154: fixed potential skb leak with mac802154_parse_frame_start X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7629d1eaf33672c9d35ba1e2ad12b459d56ca3b1;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index 3c3069fd6971..4c133239ad39 100644 --- a/net/mac802154/wpan.c +++ b/net/mac802154/wpan.c @@ -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; }