summaryrefslogtreecommitdiff
path: root/sapi/cgi
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2001-08-03 07:15:14 +0000
committerZeev Suraski <zeev@php.net>2001-08-03 07:15:14 +0000
commit2ec440078a74d86a0ddcd0818bc37d21bfe98082 (patch)
tree031fed6ccad35814abc94ad3df7182ebb7d74bd6 /sapi/cgi
parent11908f2db85a7de4b1fcb27b942fe4e558b0b815 (diff)
downloadphp-git-2ec440078a74d86a0ddcd0818bc37d21bfe98082.tar.gz
Get rid of a couple of bogus persist_alloc()'s, and some cleanup
Diffstat (limited to 'sapi/cgi')
-rw-r--r--sapi/cgi/cgi_main.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index e34c504c20..c8c366b844 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -304,7 +304,7 @@ static void init_request_info(TSRMLS_D)
php_destroy_request_info()! */
#if DISCARD_PATH
if (script_filename) {
- SG(request_info).path_translated = estrdup(script_filename);
+ SG(request_info).path_translated = strdup(script_filename);
} else {
SG(request_info).path_translated = NULL;
}
@@ -538,7 +538,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
break;
case 'f': /* parse file */
- script_file = estrdup(ap_php_optarg);
+ script_file = strdup(ap_php_optarg);
no_headers = 1;
break;
@@ -687,7 +687,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
if (!cgi) {
if (!SG(request_info).path_translated && argc > ap_php_optind) {
- SG(request_info).path_translated = estrdup(argv[ap_php_optind]);
+ SG(request_info).path_translated = strdup(argv[ap_php_optind]);
}
} else {
/* If for some reason the CGI interface is not setting the
@@ -703,7 +703,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
env_path_translated = getenv("PATH_TRANSLATED");
#endif
if(env_path_translated) {
- SG(request_info).path_translated = estrdup(env_path_translated);
+ SG(request_info).path_translated = strdup(env_path_translated);
}
}
if (cgi || SG(request_info).path_translated) {
@@ -768,15 +768,12 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
#endif
}
-
- if (SG(request_info).path_translated) {
- persist_alloc(SG(request_info).path_translated);
- }
-
php_request_shutdown((void *) 0);
php_module_shutdown();
- STR_FREE(SG(request_info).path_translated);
+ if (SG(request_info).path_translated) {
+ free(SG(request_info).path_translated);
+ }
if (cgi_sapi_module.php_ini_path_override) {
free(cgi_sapi_module.php_ini_path_override);