[DF-2601] Fix memory leak