diff options
Diffstat (limited to 'ext/spl/spl_dllist.c')
-rw-r--r-- | ext/spl/spl_dllist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 10e104270c..ba9488abfc 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -257,6 +257,7 @@ static void spl_ptr_llist_pop(spl_ptr_llist *llist, zval *ret) /* {{{ */ llist->count--; ZVAL_COPY(ret, &tail->data); + tail->prev = NULL; if (llist->dtor) { llist->dtor(tail); } @@ -310,6 +311,7 @@ static void spl_ptr_llist_shift(spl_ptr_llist *llist, zval *ret) /* {{{ */ llist->count--; ZVAL_COPY(ret, &head->data); + head->next = NULL; if (llist->dtor) { llist->dtor(head); } |