diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-04-07 12:39:43 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-04-07 12:39:43 +0000 |
| commit | 8c40d605e4f397899c8e111765a86a012c9f9db1 (patch) | |
| tree | b53d263ffe2d0154a5a60d24339ab018aa55886c /sapi/cgi | |
| parent | ead7652457b9add204a1bd372a197afe134ba662 (diff) | |
| download | php-git-8c40d605e4f397899c8e111765a86a012c9f9db1.tar.gz | |
Removed unnecessary copying
Diffstat (limited to 'sapi/cgi')
| -rw-r--r-- | sapi/cgi/cgi_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 522cfd133b..77df4f6263 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -433,7 +433,7 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) { if (!FCGX_IsCGI()) { FCGX_Request *request = (FCGX_Request *) SG(server_context); - char **env, *p, *t; + char **env, *p; int magic_quotes_gpc = PG(magic_quotes_gpc); /* turn off magic_quotes while importing environment variables */ @@ -443,9 +443,9 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) if (!p) { /* malformed entry? */ continue; } - t = estrndup(*env, p - *env); - php_register_variable(t, p + 1, array_ptr TSRMLS_CC); - efree(t); + *p = 0; + php_register_variable(*env, p + 1, array_ptr TSRMLS_CC); + *p = '='; } PG(magic_quotes_gpc) = magic_quotes_gpc; } |
