Bug fix: Double free of linked list.