dfc: Fixed some memory leaks