Fix small memory leak on exit.