summaryrefslogtreecommitdiff
path: root/ext/spl/spl_heap.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-09-24 16:42:59 +0300
committerDmitry Stogov <dmitry@zend.com>2015-09-24 16:42:59 +0300
commit415000ed93c6811cbceae3344d76ec63dbd7fff3 (patch)
tree717f0a5cb1697f95bfa101e7fea4d7f0ba0624fd /ext/spl/spl_heap.c
parent6413ecb4390d6b0f5e452a5d8f72f847fb04fa04 (diff)
downloadphp-git-415000ed93c6811cbceae3344d76ec63dbd7fff3.tar.gz
Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks)
Diffstat (limited to 'ext/spl/spl_heap.c')
-rw-r--r--ext/spl/spl_heap.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index ad520f948a..ddcfbb1168 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -378,13 +378,7 @@ static zend_object *spl_heap_object_new_ex(zend_class_entry *class_type, zval *o
intern->ce_get_iterator = other->ce_get_iterator;
if (clone_orig) {
- int i;
intern->heap = spl_ptr_heap_clone(other->heap);
- for (i = 0; i < intern->heap->count; ++i) {
- if (Z_REFCOUNTED(intern->heap->elements[i])) {
- Z_ADDREF(intern->heap->elements[i]);
- }
- }
} else {
intern->heap = other->heap;
}