cvs: php4 /sapi/cgi cgi_main.c
| From: | Zeev Suraski | Date: | Tue, 14 Aug 2001 23:17:03 +0000 |
| Subject: | cvs: php4 /sapi/cgi cgi_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6853@lists.php.net to get a copy of this message | ||
zeev Tue Aug 14 19:17:03 2001 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
Revert an old bogus patch
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.132 php4/sapi/cgi/cgi_main.c:1.133
--- php4/sapi/cgi/cgi_main.c:1.132 Wed Aug 8 10:01:21 2001
+++ php4/sapi/cgi/cgi_main.c Tue Aug 14 19:17:02 2001
@@ -304,7 +304,7 @@
php_destroy_request_info()! */
#if DISCARD_PATH
if (script_filename) {
- SG(request_info).path_translated = strdup(script_filename);
+ SG(request_info).path_translated = estrdup(script_filename);
} else {
SG(request_info).path_translated = NULL;
}
@@ -538,7 +538,7 @@
break;
case 'f': /* parse file */
- script_file = strdup(ap_php_optarg);
+ script_file = estrdup(ap_php_optarg);
no_headers = 1;
break;
@@ -687,7 +687,7 @@
if (!cgi) {
if (!SG(request_info).path_translated && argc > ap_php_optind) {
- SG(request_info).path_translated = strdup(argv[ap_php_optind]);
+ SG(request_info).path_translated = estrdup(argv[ap_php_optind]);
}
} else {
/* If for some reason the CGI interface is not setting the
@@ -703,7 +703,7 @@
env_path_translated = getenv("PATH_TRANSLATED");
#endif
if(env_path_translated) {
- SG(request_info).path_translated = strdup(env_path_translated);
+ SG(request_info).path_translated = estrdup(env_path_translated);
}
}
if (cgi || SG(request_info).path_translated) {
@@ -768,11 +768,13 @@
#endif
}
- php_request_shutdown((void *) 0);
-
if (SG(request_info).path_translated) {
- free(SG(request_info).path_translated);
+ persist_alloc(SG(request_info).path_translated);
}
+
+ php_request_shutdown((void *) 0);
+
+ STR_FREE(SG(request_info).path_translated);
if (cgi_sapi_module.php_ini_path_override) {
free(cgi_sapi_module.php_ini_path_override);