Fixed small memory leak in daemon