DF-2247. Fix memory memory leak