fix memory corruption in list_remove

This commit is contained in:
Ryan Hileman 2016-03-25 20:28:23 -07:00
parent d5e85cf3f9
commit 784efc8be0

2
list.c
View file

@ -54,6 +54,8 @@ bool list_remove(struct list *list, void *data)
if (cur->data == data) {
if (cur == list->head) {
list->head = next;
} else {
prev->next = next;
}
if (cur == list->tail) {
list->tail = prev;