summaryrefslogtreecommitdiff
path: root/ext/ftp/php_ftp.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-06-05 16:04:11 +0400
committerDmitry Stogov <dmitry@zend.com>2014-06-05 16:04:11 +0400
commitc1965f58d4dd3970912dcd6a63ccd5860bae1a97 (patch)
tree15b4a94e8e8405f791438c468ad4eb03f60c4079 /ext/ftp/php_ftp.c
parent3d87391cc06fe87344536e88ac74ded22b0195cf (diff)
downloadphp-git-c1965f58d4dd3970912dcd6a63ccd5860bae1a97.tar.gz
Use reference counting instead of zval duplication
Diffstat (limited to 'ext/ftp/php_ftp.c')
-rw-r--r--ext/ftp/php_ftp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 46e336deb0..1bf485f4ed 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -632,7 +632,7 @@ PHP_FUNCTION(ftp_alloc)
long size, ret;
zend_string *response = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &z_ftp, &size, &zresponse) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z/", &z_ftp, &size, &zresponse) == FAILURE) {
RETURN_FALSE;
}
@@ -640,7 +640,6 @@ PHP_FUNCTION(ftp_alloc)
ret = ftp_alloc(ftp, size, zresponse ? &response : NULL);
if (response) {
- ZVAL_DEREF(zresponse);
zval_dtor(zresponse);
ZVAL_STR(zresponse, response);
}