diff options
author | Andrei Zmievski <andrei@php.net> | 1999-11-23 20:25:55 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 1999-11-23 20:25:55 +0000 |
commit | 9781bf59cb821bbde261d6bbc430c841eadb4b9d (patch) | |
tree | 27db39060358025d8c4d01bb1477058118fc60fe /sapi | |
parent | 6a25e05d959597ebbffb60aae4f6bea8f392e625 (diff) | |
download | php-git-9781bf59cb821bbde261d6bbc430c841eadb4b9d.tar.gz |
(main) In this special case, free path_translated. Fix for #2795.
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cgi/cgi_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 2512a2083f..3ed12fe4d5 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -221,6 +221,7 @@ int main(int argc, char *argv[]) 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 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine } 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 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine } 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 |