repair from memory leak