summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/output.c4
-rw-r--r--ext/standard/url_scanner_ex.c9
-rw-r--r--ext/standard/url_scanner_ex.re7
-rw-r--r--main/output.c4
4 files changed, 3 insertions, 21 deletions
diff --git a/ext/standard/output.c b/ext/standard/output.c
index 88f74b57f0..970917558d 100644
--- a/ext/standard/output.c
+++ b/ext/standard/output.c
@@ -361,10 +361,6 @@ static int php_ub_body_write_no_header(const char *str, uint str_length)
result = OG(php_header_write)(str, str_length);
- if (newstr) {
- free(newstr);
- }
-
if (OG(implicit_flush)) {
sapi_flush();
}
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index e7becb5c3c..766c85c90c 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Fri Dec 22 23:45:29 2000 */
+/* Generated by re2c 0.5 on Tue Jan 9 17:13:20 2001 */
#line 1 "/home/sas/src/php4/ext/standard/url_scanner_ex.re"
/*
+----------------------------------------------------------------------+
@@ -691,14 +691,9 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char
mainloop(ctx, src, srclen);
*newlen = ctx->result.len;
- if (ctx->result.len == 0) {
- return strdup("");
- }
smart_str_0(&ctx->result);
- ret = malloc(ctx->result.len + 1);
- memcpy(ret, ctx->result.c, ctx->result.len + 1);
ctx->result.len = 0;
- return ret;
+ return ctx->result.c;
}
PHP_RINIT_FUNCTION(url_scanner)
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index 3060658097..3eb7a56c08 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -334,14 +334,9 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char
mainloop(ctx, src, srclen);
*newlen = ctx->result.len;
- if (ctx->result.len == 0) {
- return strdup("");
- }
smart_str_0(&ctx->result);
- ret = malloc(ctx->result.len + 1);
- memcpy(ret, ctx->result.c, ctx->result.len + 1);
ctx->result.len = 0;
- return ret;
+ return ctx->result.c;
}
PHP_RINIT_FUNCTION(url_scanner)
diff --git a/main/output.c b/main/output.c
index 88f74b57f0..970917558d 100644
--- a/main/output.c
+++ b/main/output.c
@@ -361,10 +361,6 @@ static int php_ub_body_write_no_header(const char *str, uint str_length)
result = OG(php_header_write)(str, str_length);
- if (newstr) {
- free(newstr);
- }
-
if (OG(implicit_flush)) {
sapi_flush();
}