summaryrefslogtreecommitdiff
path: root/Zend/zend_gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_gc.c')
-rw-r--r--Zend/zend_gc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index bcca0929bb..00e50e19e0 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -585,16 +585,10 @@ static int gc_collect_roots(TSRMLS_D)
GC_G(to_free).prev->next = &GC_G(to_free);
} else {
/* add roots into list to free */
-//???
- gc_root_buffer *p1 = GC_G(to_free).next;
- gc_root_buffer *p2 = GC_G(to_free).prev;
- gc_root_buffer *p3 = GC_G(roots).next;
- gc_root_buffer *p4 = GC_G(roots).prev;
-
- p2->next = p3;
- p3->prev = p2;
- p4->next = &GC_G(to_free);
- GC_G(to_free).prev = p4;
+ GC_G(to_free).prev->next = GC_G(roots).next;
+ GC_G(roots).next->prev = GC_G(to_free).prev;
+ GC_G(roots).prev->next = &GC_G(to_free);
+ GC_G(to_free).prev = GC_G(roots).prev;
}
GC_G(roots).next = &GC_G(roots);