summaryrefslogtreecommitdiff
path: root/ext/standard/formatted_print.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-03-05 11:10:52 +0400
committerDmitry Stogov <dmitry@zend.com>2014-03-05 11:10:52 +0400
commit040dea8b82a00083b3975351271f34f3775d9a60 (patch)
tree0352d30dc79148003cda60a84adbb118ed153987 /ext/standard/formatted_print.c
parent19670c2bbcd5fc1339e160929cc81db3ae940392 (diff)
downloadphp-git-040dea8b82a00083b3975351271f34f3775d9a60.tar.gz
Arguments taken by internal functions using zend_parse_parameters() with "+" and "*" specifications must not be deallocated anymore.
Diffstat (limited to 'ext/standard/formatted_print.c')
-rw-r--r--ext/standard/formatted_print.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index b8724dea55..8d1d051f4f 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -385,7 +385,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
/* verify the number of args */
if ((use_array && argc != (2 + format_offset))
|| (!use_array && argc < (1 + format_offset))) {
- efree(args);
WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
}
@@ -408,7 +407,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
ZVAL_COPY_VALUE(&newargs[i], zv);
i++;
}
- efree(args);
zval_dtor(&array);
args = newargs;
format_offset = 0;
@@ -450,7 +448,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
if (argnum <= 0) {
efree(result);
- efree(args);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument number must be greater than zero");
return NULL;
}
@@ -491,7 +488,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
PRINTF_DEBUG(("sprintf: getting width\n"));
if ((width = php_sprintf_getnumber(format, &inpos)) < 0) {
efree(result);
- efree(args);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Width must be greater than zero and less than %d", INT_MAX);
return NULL;
}
@@ -508,7 +504,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
if (isdigit((int)format[inpos])) {
if ((precision = php_sprintf_getnumber(format, &inpos)) < 0) {
efree(result);
- efree(args);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Precision must be greater than zero and less than %d", INT_MAX);
return NULL;
}
@@ -528,7 +523,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
if (argnum >= argc) {
efree(result);
- efree(args);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too few arguments");
return NULL;
}
@@ -649,8 +643,6 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
}
}
- efree(args);
-
/* possibly, we have to make sure we have room for the terminating null? */
result->val[outpos]=0;
result->len = outpos;