All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix possible leaks in netfilter.
@ 2004-09-01 15:51 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2004-09-01 15:51 UTC (permalink / raw)
  To: linux-kernel

Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/net/ipv4/netfilter/ipt_recent.c linux-2.6/net/ipv4/netfilter/ipt_recent.c
--- bk-linus/net/ipv4/netfilter/ipt_recent.c	2004-08-24 00:02:41.000000000 +0100
+++ linux-2.6/net/ipv4/netfilter/ipt_recent.c	2004-09-01 13:31:21.000000000 +0100
@@ -827,6 +827,7 @@ checkentry(const char *tablename,
 			if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, no tables.\n");
 #endif
 			spin_unlock_bh(&recent_lock);
+			vfree(hold);
 			return -ENOMEM;
 		}
 		while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (last_table = curr_table) && (curr_table = curr_table->next) );
@@ -835,6 +836,7 @@ checkentry(const char *tablename,
 			if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, table already destroyed.\n");
 #endif
 			spin_unlock_bh(&recent_lock);
+			vfree(hold);
 			return -ENOMEM;
 		}
 		if(last_table) last_table->next = curr_table->next; else r_tables = curr_table->next;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-01 16:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-01 15:51 [PATCH] Fix possible leaks in netfilter Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.