diff options
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r-- | sapi/cgi/cgi_main.c | 5 |
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': |