DF-2196. Fix memory leak