summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2000-06-29 13:34:59 +0000
committerSVN Migration <svn@php.net>2000-06-29 13:34:59 +0000
commitd26abbcdc9b2decf18e5c8b33ae5be8a08d0d368 (patch)
treefe3bd08d30845a9510557728022bfa006a62cc53 /sapi/cgi/cgi_main.c
parent01a8f4606ea99e9be92dbd4a27c69330786c7a8c (diff)
downloadphp-git-php-4.0.1pl1.tar.gz
This commit was manufactured by cvs2svn to create tag 'php_4_0_1pl1'.php-4.0.1pl1
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r--sapi/cgi/cgi_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index f3b91f0ffe..9cbcb2c9a6 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -489,7 +489,10 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
if (!cgi) { /* never execute the arguments if you are a CGI */
- SG(request_info).argv0 = NULL;
+ if (!SG(request_info).argv0) {
+ free(SG(request_info).argv0);
+ SG(request_info).argv0 = NULL;
+ }
while ((c = ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:")) != -1) {
switch (c) {
case 'f':