fix memory leak
init variable