Fix double free
Fix memory leaks in CFC tests
Fix memory leaks in CFC