DF-2248. Fix memory memory leak