[DF-3185] Fix memory leak