From: Guo-Fu Tseng Date: Wed, 17 Mar 2010 00:09:29 +0000 (+0000) Subject: jme: Fix VLAN memory leak X-Git-Tag: v2.6.33.2~78 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=53238f89fcbe3626d2520ae1580c5997793827f1;p=karo-tx-linux.git jme: Fix VLAN memory leak commit 17da69b8bfbe441a33a873ad5dd7d3d85800bf2b upstream. Fix memory leak while receiving 8021q tagged packet which is not registered by user. Signed-off-by: Guo-Fu Tseng Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 792b88fc3574..3da390acef8d 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c @@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx) jme->jme_vlan_rx(skb, jme->vlgrp, le16_to_cpu(rxdesc->descwb.vlan)); NET_STAT(jme).rx_bytes += 4; + } else { + dev_kfree_skb(skb); } } else { jme->jme_rx(skb);