Patchwork [-next] netfilter: use kfree_skb() not kfree()

login
register
mail settings
Submitter Dan Carpenter
Date June 30, 2012, 11:48 a.m.
Message ID <20120630114853.GA22767@elgon.mountain>
Download mbox | patch
Permalink /patch/168296/
State Accepted
Headers show

Comments

Dan Carpenter - June 30, 2012, 11:48 a.m.
This was should be a kfree_skb() here to free the sk_buff pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - July 1, 2012, 12:27 a.m.
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Sat, 30 Jun 2012 14:48:53 +0300

> This was should be a kfree_skb() here to free the sk_buff pointer.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

My bad, applied, thanks Dan.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 1bd1732..dfbb019 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -156,7 +156,7 @@  static void ebt_ulog_packet(unsigned int hooknr, const struct sk_buff *skb,
 	nlh = nlmsg_put(ub->skb, 0, ub->qlen, 0,
 			size - NLMSG_ALIGN(sizeof(*nlh)), 0);
 	if (!nlh) {
-		kfree(ub->skb);
+		kfree_skb(ub->skb);
 		ub->skb = NULL;
 		goto unlock;
 	}