[PATCH] net/bridge/netfilter/ebtables.c: use available error handling code

Subsystems: ethernet bridge, networking [general], the rest

STALE5545d

2 messages, 2 authors, 2011-08-11 · open the first message on its own page

[PATCH] net/bridge/netfilter/ebtables.c: use available error handling code

From: Julia Lawall <hidden>
Date: 2011-08-11 11:59:48

From: Julia Lawall <redacted>

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

Signed-off-by: Julia Lawall <redacted>

---
 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;

Re: [PATCH] net/bridge/netfilter/ebtables.c: use available error handling code

From: David Miller <davem@davemloft.net>
Date: 2011-08-11 12:55:53

From: Julia Lawall <redacted>
Date: Thu, 11 Aug 2011 13:59:38 +0200
From: Julia Lawall <redacted>

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

Signed-off-by: Julia Lawall <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help