com php-src: Fixed Bug #69998 curl multi leaking memory: NEWS ext/curl/multi.c

From: Date: Sat, 01 Aug 2015 18:55:00 +0000
Subject: com php-src: Fixed Bug #69998 curl multi leaking memory: NEWS ext/curl/multi.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88263@lists.php.net to get a copy of this message
Commit: fb37da2a4875abc2153da583faca6c7554810ce9 Author: Pierrick Charron <pierrick@webstart.fr> Sat, 1 Aug 2015 14:22:36 -0400 Parents: 2d6f0e4584375c90a895fed4074d579f364aa347 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fb37da2a4875abc2153da583faca6c7554810ce9 Log: 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. Bugs: https://bugs.php.net/69998 Changed paths: M NEWS M ext/curl/multi.c Diff: diff --git a/NEWS b/NEWS index 5ad8082..7d0169d 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ PHP NEWS - IMAP: . Fixed bug #70158 (Building with static imap fails). (cmb) + . Fixed bug #69998 (curl multi leaking memory). (Pierrick) - Opcache: . Fixed bug #70111 (Segfault when a function uses both an explicit return diff --git a/ext/curl/multi.c b/ext/curl/multi.c index d5916d6..8f52b24 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); } /* }}} */

« previous php.cvs (#88263) next »