[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110720072343.GF6445@shale.localdomain>
Date: Wed, 20 Jul 2011 10:23:43 +0300
From: Dan Carpenter <error27@...il.com>
To: Shirley Ma <xma@...ibm.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [patch] skbuff: use kfree_skb() instead of kfree()
"n" was allocated with alloc_skb() so we should free it with
kfree_skb() instead of regular kfree().
Signed-off-by: Dan Carpenter <error27@...il.com>
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index d220119..cc0c6f0 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -799,7 +799,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
if (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) {
if (skb_copy_ubufs(skb, gfp_mask)) {
- kfree(n);
+ kfree_skb(n);
goto out;
}
skb_shinfo(skb)->tx_flags &= ~SKBTX_DEV_ZEROCOPY;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists