memory leak patch