public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [RFC 1/2] batman-adv: Free local translation table on error in tt_init
@ 2012-04-29  9:06 Sven Eckelmann
  2012-04-29  9:06 ` [B.A.T.M.A.N.] [RFC 2/2] batman-adv: Return error codes instead of -1 on failures Sven Eckelmann
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Sven Eckelmann @ 2012-04-29  9:06 UTC (permalink / raw)
  To: b.a.t.m.a.n

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 translation-table.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/translation-table.c b/translation-table.c
index 88c62f1..c3b7773 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1776,8 +1776,10 @@ int tt_init(struct bat_priv *bat_priv)
 	if (!tt_local_init(bat_priv))
 		return 0;
 
-	if (!tt_global_init(bat_priv))
+	if (!tt_global_init(bat_priv)) {
+		tt_local_table_free(bat_priv);
 		return 0;
+	}
 
 	tt_start_timer(bat_priv);
 
-- 
1.7.10


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

end of thread, other threads:[~2012-05-04  7:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-29  9:06 [B.A.T.M.A.N.] [RFC 1/2] batman-adv: Free local translation table on error in tt_init Sven Eckelmann
2012-04-29  9:06 ` [B.A.T.M.A.N.] [RFC 2/2] batman-adv: Return error codes instead of -1 on failures Sven Eckelmann
2012-04-29  9:12 ` [B.A.T.M.A.N.] [RFC 1/2] batman-adv: Free local translation table on error in tt_init Antonio Quartulli
2012-04-29  9:31 ` [B.A.T.M.A.N.] [RFC 3/2] batman-adv: Free bla hashes on error in bla_init Sven Eckelmann
2012-05-04  7:34 ` [B.A.T.M.A.N.] [RFC 1/2] batman-adv: Free local translation table on error in tt_init Marek Lindner
2012-05-04  7:43   ` Sven Eckelmann
2012-05-04  7:48     ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox