Explorar el Código

mtree: set root tree pointer to null

- avoid double free if there is error at startup
Daniel-Constantin Mierla hace 15 años
padre
commit
fa898c615d
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      modules/mtree/mtree.c

+ 1 - 0
modules/mtree/mtree.c

@@ -753,6 +753,7 @@ void mt_destroy_trees(void)
 		if (*_ptree!=NULL)
 			mt_free_tree(*_ptree);
 		shm_free(_ptree);
+		_ptree = NULL;
 	}
 }