cvs: /php4/sapi/cgi cgi_main.c
| From: | Andrei Zmievski | Date: | Tue, 23 Nov 1999 20:26:25 +0000 |
| Subject: | cvs: /php4/sapi/cgi cgi_main.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6759@lists.php.net to get a copy of this message | ||
andrei Tue Nov 23 15:26:25 1999 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
(main) In this special case, free path_translated. Fix for #2795.
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.4 php4/sapi/cgi/cgi_main.c:1.5
--- php4/sapi/cgi/cgi_main.c:1.4 Tue Nov 23 10:39:09 1999
+++ php4/sapi/cgi/cgi_main.c Tue Nov 23 15:25:55 1999
@@ -221,6 +221,7 @@
int cgi_started=0;
int behavior=PHP_MODE_STANDARD;
int no_headers=0;
+ int free_path_translated=0;
#if SUPPORT_INTERACTIVE
int interactive=0;
#endif
@@ -320,6 +321,7 @@
}
cgi_started=1;
SG(request_info).path_translated = estrdup(optarg);
+ free_path_translated=1;
/* break missing intentionally */
case 'q':
no_headers = 1;
@@ -488,6 +490,8 @@
}
php3_header(); /* Make sure headers have been sent */
+ if (free_path_translated)
+ efree(SG(request_info).path_translated);
php_request_shutdown((void *) 0);
php_module_shutdown();
#ifdef ZTS