[DF-4090] Fixed memory leak