mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 01:33:55 +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…
Reference in a new issue