Right place to fix the memory leak.