mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-06 06:53:49 +00:00
fix memory corruption in list_remove
This commit is contained in:
parent
d5e85cf3f9
commit
784efc8be0
1 changed files with 2 additions and 0 deletions
2
list.c
2
list.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue