Commit 17da69b8 authored by Guo-Fu Tseng's avatar Guo-Fu Tseng Committed by David S. Miller

jme: Fix VLAN memory leak

Fix memory leak while receiving 8021q tagged packet which is not
registered by user.
Signed-off-by: default avatarGuo-Fu Tseng <cooldavid@cooldavid.org>
Cc: stable@kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 658cc524
...@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx) ...@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx)
jme->jme_vlan_rx(skb, jme->vlgrp, jme->jme_vlan_rx(skb, jme->vlgrp,
le16_to_cpu(rxdesc->descwb.vlan)); le16_to_cpu(rxdesc->descwb.vlan));
NET_STAT(jme).rx_bytes += 4; NET_STAT(jme).rx_bytes += 4;
} else {
dev_kfree_skb(skb);
} }
} else { } else {
jme->jme_rx(skb); jme->jme_rx(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment