jme: Fix VLAN memory leak

Fix memory leak while receiving 8021q tagged packet which is not
registered by user.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Guo-Fu Tseng 2010-03-17 00:09:29 +00:00 committed by David S. Miller
parent 658cc52430
commit 17da69b8bf

View File

@ -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);