Skip to content

Commit b35ffde

Browse files
committed
Revert "Remove a useless memory write in zend_llist_del_element"
This reverts commit fad960a as required by Stas and Christopher
1 parent fad960a commit b35ffde

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_llist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
9191
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
9292
{
9393
zend_llist_element *current=l->head;
94+
zend_llist_element *next;
9495

9596
while (current) {
97+
next = current->next;
9698
if (compare(current->data, element)) {
9799
DEL_LLIST_ELEMENT(current, l);
98100
break;
99101
}
100-
current = current->next;
102+
current = next;
101103
}
102104
}
103105

0 commit comments

Comments
 (0)