cvs: php4 /sapi/cgi cgi_main.c
| From: | Andi Gutmans | Date: | Mon, 26 Jun 2000 16:17:58 +0000 |
| Subject: | cvs: php4 /sapi/cgi cgi_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-480@lists.php.net to get a copy of this message | ||
andi Mon Jun 26 09:17:58 2000 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
- Try two in fixing the problem with memory leaks reporting path_translated
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.55 php4/sapi/cgi/cgi_main.c:1.56
--- php4/sapi/cgi/cgi_main.c:1.55 Mon Jun 26 08:55:59 2000
+++ php4/sapi/cgi/cgi_main.c Mon Jun 26 09:17:58 2000
@@ -651,8 +651,6 @@
}
file_handle.free_filename = 0;
- /* Duplicate the filename with strdup() so that the memory manager doesn't nuke it too early
*/
- file_handle.filename = strdup(file_handle.filename);
switch (behavior) {
case PHP_MODE_STANDARD:
php_execute_script(&file_handle CLS_CC ELS_CC PLS_CC);
@@ -682,12 +680,16 @@
php_header(); /* Make sure headers have been sent */
- STR_FREE(SG(request_info).path_translated);
+
+ if (SG(request_info).path_translated) {
+ zend_persist(SG(request_info).path_translated);
+ }
php_request_shutdown((void *) 0);
php_module_shutdown();
+
+ STR_FREE(SG(request_info).path_translated);
- free(file_handle.filename);
#ifdef ZTS
tsrm_shutdown();
#endif