Fix bug causing the program to probably go off and free NULL.

This commit is contained in:
Danila Fedorin 2016-12-26 00:32:51 -08:00
parent 75ff581de3
commit a4d41361dd

View File

@ -116,7 +116,7 @@ void* ll_poptail(ll* ll) {
void ll_clear(ll* ll){
ll_node* head = ll->head;
while(ll->head){
while(head){
ll_node* to_free = head;
head = head->next;
free(to_free);