list.c
/* Delete list and all of its nodes */
Delete list and all of its nodes
Delete list and all of its nodes
void list_destroy(list_t **_list)
{
	while ((*_list)->len) {
		list_delete(*_list,&(*_list)->head);
	}
	free(*_list);
	*_list = NULL;
}
void list_destroy ( list_t * * _list ) { while ( ( * _list ) -> len ) { list_delete ( * _list , & ( * _list ) -> head ) ; } free ( * _list ) ; * _list = NULL ; }
Delete list and all of its nodes
Delete list and all of its nodes