netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-2.6 1/3] jme: Fix VLAN memory leak
@ 2010-03-15  5:15 cooldavid
  2010-03-15  5:15 ` [PATCH net-2.6 2/3] jme: Adding lock to protect vlgrp structure cooldavid
  0 siblings, 1 reply; 6+ messages in thread
From: cooldavid @ 2010-03-15  5:15 UTC (permalink / raw)
  To: David Miller; +Cc: Guo-Fu Tseng, linux-netdev, Ethan Hsiao

From: Guo-Fu Tseng <cooldavid@cooldavid.org>

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

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
---
 drivers/net/jme.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 0f31497..cfc7b98 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);
-- 
1.6.4.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-16  7:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15  5:15 [PATCH net-2.6 1/3] jme: Fix VLAN memory leak cooldavid
2010-03-15  5:15 ` [PATCH net-2.6 2/3] jme: Adding lock to protect vlgrp structure cooldavid
2010-03-15  5:15   ` [PATCH net-2.6 3/3] jme: Advance driver version number cooldavid
2010-03-15 22:54   ` [PATCH net-2.6 2/3] jme: Adding lock to protect vlgrp structure David Miller
2010-03-16  7:49     ` Guo-Fu Tseng
2010-03-16  7:55       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).