jme: Fix VLAN memory leak
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Wed, 17 Mar 2010 00:09:29 +0000 (00:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2010 04:13:59 +0000 (21:13 -0700)
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>
drivers/net/jme.c

index 0f31497833df518795f34fadeb4f1f5af85772c6..cfc7b9824d6f266011792e913ef51a420b92ca6d 100644 (file)
@@ -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);