diff options
author | Andi Gutmans <andi@php.net> | 2000-06-26 16:17:58 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-06-26 16:17:58 +0000 |
commit | 91ed009ae2fb0caa480196f70dd1d9989751dae6 (patch) | |
tree | cdcc2b764ab209bab3a8eda8104c6d64645199b3 /sapi/cgi | |
parent | effa42696ec5ef889da5c86c4ff3feefb5673f03 (diff) | |
download | php-git-91ed009ae2fb0caa480196f70dd1d9989751dae6.tar.gz |
- Try two in fixing the problem with memory leaks reporting path_translated
Diffstat (limited to 'sapi/cgi')
-rw-r--r-- | sapi/cgi/cgi_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 6770c5d285..1ea437e67f 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -651,8 +651,6 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine } 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 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine 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(); - free(file_handle.filename); + STR_FREE(SG(request_info).path_translated); + #ifdef ZTS tsrm_shutdown(); #endif |