[B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Free local translation table on error in tt_init

Sven Eckelmann
2012-05-04T07:32:30Z

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