com php-src: In most user extensions functions like mysql_close() should use zend_list_close() instead of zend_list_delete(). This closes the actual
connection and frees extension specif ic data structures, but doesn't free zend_ref erence structure that might be referenced from zv al(s). This also
doesn't decrement the reso urce reference counter.: ext/curl/interface.c ext /gd/gd.c ext/mcrypt/mcrypt.c ext/sysvshm/sysvshm.c ext/wddx/wddx.c

From: Date: Tue, 13 May 2014 09:18:00 +0000
Subject: com php-src: In most user extensions functions like mysql_close() should use zend_list_close() instead of zend_list_delete(). This closes the actual
connection and frees extension specif ic data structures, but doesn't free zend_ref erence structure that might be referenced from zv al(s). This also
doesn't decrement the reso urce reference counter.: ext/curl/interface.c ext /gd/gd.c ext/mcrypt/mcrypt.c ext/sysvshm/sysvshm.c ext/wddx/wddx.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78310@lists.php.net to get a copy of this message
Commit: b8b8c497c4b9d6deceee0b287fd7630f79f7f4ea Author: Dmitry Stogov <dmitry@zend.com> Tue, 13 May 2014 13:18:00 +0400 Parents: f1720348ca7cfea9e88a294faf0ec077c66786f1 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b8b8c497c4b9d6deceee0b287fd7630f79f7f4ea Log: In most user extensions functions like mysql_close() should use zend_list_close() instead of zend_list_delete(). This closes the actual connection and frees extension specific data structures, but doesn't free zend_reference structure that might be referenced from zval(s). This also doesn't decrement the resource reference counter. Changed paths: M ext/curl/interface.c M ext/gd/gd.c M ext/mcrypt/mcrypt.c M ext/sysvshm/sysvshm.c M ext/wddx/wddx.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 5ba7797..48fc27a 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface..c @@ -3136,7 +3136,7 @@ PHP_FUNCTION(curl_close) return; } - zend_list_delete(Z_RES_P(zid)); + zend_list_close(Z_RES_P(zid)); } /* }}} */ diff --git a/ext/gd/gd.c b/ext/gd/gd.c index f4245b9..54cf68e 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4011,7 +4011,7 @@ PHP_FUNCTION(imagepsfreefont) } ZEND_FETCH_RESOURCE(f_ind, int *, fnt, -1, "Type 1 font", le_ps_font); - zend_list_delete(Z_LVAL_P(fnt)); + zend_list_close(Z_RES_P(fnt)); RETURN_TRUE; } /* }}} */ diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 9183ed9..84b0c92 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -588,7 +588,7 @@ PHP_FUNCTION(mcrypt_generic_init) /* If this function fails, close the mcrypt module to prevent crashes * when further functions want to access this resource */ if (result < 0) { - zend_list_delete(Z_RES_P(mcryptind)); + zend_list_close(Z_RES_P(mcryptind)); switch (result) { case -3: php_error_docref(NULL TSRMLS_CC, E_WARNING, "Key length incorrect"); @@ -733,7 +733,7 @@ PHP_FUNCTION(mcrypt_enc_self_test) PHP_FUNCTION(mcrypt_module_close) { MCRYPT_GET_TD_ARG - zend_list_delete(Z_RES_P(mcryptind)); + zend_list_close(Z_RES_P(mcryptind)); RETURN_TRUE; } /* }}} */ diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index b6e27ff..bb908a4 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -212,7 +212,7 @@ PHP_FUNCTION(shm_detach) return; } SHM_FETCH_RESOURCE(shm_list_ptr, shm_id); - RETURN_BOOL(SUCCESS == zend_list_delete(Z_RES_P(shm_id))); + RETURN_BOOL(SUCCESS == zend_list_close(Z_RES_P(shm_id))); } /* }}} */ diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index f383603..699bad0 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1187,7 +1187,7 @@ PHP_FUNCTION(wddx_packet_end) RETVAL_STR(STR_COPY(packet->s)); - zend_list_delete(Z_RES_P(packet_id)); + zend_list_close(Z_RES_P(packet_id)); } /* }}} */

« previous php.cvs (#78310) next »