DF-2253. Fix memory leak