summaryrefslogtreecommitdiff
path: root/ext/mcrypt/mcrypt.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-05-13 13:18:00 +0400
committerDmitry Stogov <dmitry@zend.com>2014-05-13 13:18:00 +0400
commitb8b8c497c4b9d6deceee0b287fd7630f79f7f4ea (patch)
tree84d30e04a53a93b967ae57e27e92be306fd9fc55 /ext/mcrypt/mcrypt.c
parentf1720348ca7cfea9e88a294faf0ec077c66786f1 (diff)
downloadphp-git-b8b8c497c4b9d6deceee0b287fd7630f79f7f4ea.tar.gz
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.
Diffstat (limited to 'ext/mcrypt/mcrypt.c')
-rw-r--r--ext/mcrypt/mcrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 9183ed9b9f..84b0c9248c 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;
}
/* }}} */