Refactor cts pointer and free()ing on abnormal exit of associated list