DF-2198. Fix memory leak