Преглед изворни кода

prefix_route(s): fix mod_destroy/tree_close()

tree_close(), called from mod_destroy did not take into account
the possibility of mod_init not being run (e.g. startup error).

Reported-by: Klaus Darilion  klaus.mailinglists pernau at
Andrei Pelinescu-Onciul пре 16 година
родитељ
комит
7fc0ed074c
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      modules_s/prefix_route/tree.c

+ 3 - 1
modules_s/prefix_route/tree.c

@@ -334,7 +334,9 @@ int tree_init(void)
 
 void tree_close(void)
 {
-	tree_flush(tree_get());
+	if (shared_tree)
+		tree_flush(tree_get());
+	shared_tree = NULL;
 }