netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/bridge/netfilter/ebtables.c: use available error handling code
@ 2011-08-11 11:59 Julia Lawall
  2011-08-11 12:53 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2011-08-11 11:59 UTC (permalink / raw)
  To: Bart De Schuymer
  Cc: kernel-janitors, Patrick McHardy, Stephen Hemminger, davem,
	netfilter-devel, netfilter, coreteam, bridge, netdev,
	linux-kernel

From: Julia Lawall <julia@diku.dk>

Free the locally allocated table and newinfo as done in adjacent error
handling code.

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 net/bridge/netfilter/ebtables.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 2b5ca1a..5864cc4 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1198,7 +1198,8 @@ ebt_register_table(struct net *net, const struct ebt_table *input_table)
 
 	if (table->check && table->check(newinfo, table->valid_hooks)) {
 		BUGPRINT("The table doesn't like its own initial data, lol\n");
-		return ERR_PTR(-EINVAL);
+		ret = -EINVAL;
+		goto free_chainstack;
 	}
 
 	table->private = newinfo;


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

* Re: [PATCH] net/bridge/netfilter/ebtables.c: use available error handling code
  2011-08-11 11:59 [PATCH] net/bridge/netfilter/ebtables.c: use available error handling code Julia Lawall
@ 2011-08-11 12:53 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-08-11 12:53 UTC (permalink / raw)
  To: julia
  Cc: bart.de.schuymer, kernel-janitors, kaber, shemminger,
	netfilter-devel, netfilter, coreteam, bridge, netdev,
	linux-kernel

From: Julia Lawall <julia@diku.dk>
Date: Thu, 11 Aug 2011 13:59:38 +0200

> From: Julia Lawall <julia@diku.dk>
> 
> Free the locally allocated table and newinfo as done in adjacent error
> handling code.
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>

Applied.

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

end of thread, other threads:[~2011-08-11 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 11:59 [PATCH] net/bridge/netfilter/ebtables.c: use available error handling code Julia Lawall
2011-08-11 12:53 ` 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).