summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@webstart.fr>2015-08-01 14:22:36 -0400
committerPierrick Charron <pierrick@webstart.fr>2015-08-01 14:55:00 -0400
commitfb37da2a4875abc2153da583faca6c7554810ce9 (patch)
tree2eced55a99ccbcd0af1564804155b0b9ea536cdf /ext/curl/multi.c
parent2d6f0e4584375c90a895fed4074d579f364aa347 (diff)
downloadphp-git-fb37da2a4875abc2153da583faca6c7554810ce9.tar.gz
Fixed Bug #69998 curl multi leaking memory
Fix the pointer address passed to the comparator and call zend_list_delete instead of zend_list_close to avoid closing the resource if still used.
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r--ext/curl/multi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index d5916d6f58..8f52b24a37 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -116,7 +116,7 @@ void _php_curl_multi_cleanup_list(void *data) /* {{{ */
return;
}
- zend_list_close(Z_RES_P(z_ch));
+ zend_list_delete(Z_RES_P(z_ch));
}
/* }}} */
@@ -151,7 +151,7 @@ PHP_FUNCTION(curl_multi_remove_handle)
}
RETVAL_LONG((zend_long)curl_multi_remove_handle(mh->multi, ch->cp));
- zend_llist_del_element(&mh->easyh, &z_ch, (int (*)(void *, void *))curl_compare_resources);
+ zend_llist_del_element(&mh->easyh, z_ch, (int (*)(void *, void *))curl_compare_resources);
}
/* }}} */