Skip to contentSkip to conversation

fix two bogus kfree(skb)

PATCH Applied Patrick McHardy 2 participants 2 messages May 14, 2003

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix two bogus kfree(skb)

This patch fixes two occurences of kfree(skb) in net/bridge/br_input.c and net/decnet/netfilter/dn_rtmsg.c.

Best regards,
Patrick

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1114 -> 1.1115
# net/bridge/br_input.c 1.11 -> 1.12
# net/decnet/netfilter/dn_rtmsg.c 1.1 -> 1.2
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/14 [email protected] 1.1115
# Fix bogus kfree in br_input.c and dn_rtmsg.c
# --------------------------------------------
#

net/bridge/br_input.c +1 -1
diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c
@@ -64,7 +64,7 @@
 	smp_read_barrier_depends();
 
 	if (p == NULL || p->state == BR_STATE_DISABLED) {
-		kfree(skb);
+		kfree_skb(skb);
 		goto out;
 	}
 
net/decnet/netfilter/dn_rtmsg.c +1 -1
diff -Nru a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
@@ -55,7 +55,7 @@
 
 nlmsg_failure:
 	if (skb)
-		kfree(skb);
+		kfree_skb(skb);
 	*errp = -ENOMEM;
 	if (net_ratelimit())
 		printk(KERN_ERR "dn_rtmsg: error creating netlink message\n");
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Wed, 14 May 2003 17:29:29 +0200

This patch fixes two occurences of kfree(skb) in net/bridge/br_input.c and net/decnet/netfilter/dn_rtmsg.c.

Applied, thank you.