]> granicus.if.org Git - php/commitdiff
MFH: fix leak appearing when more than one -f option specified
authorAntony Dovgal <tony2001@php.net>
Tue, 17 Apr 2007 18:51:34 +0000 (18:51 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 17 Apr 2007 18:51:34 +0000 (18:51 +0000)
sapi/cgi/cgi_main.c

index e8f277cfc358aecbe7599455ae9982de9ae9381f..4b7695456817ca33ff8e0910f88a382e3f3a45f6 100644 (file)
@@ -1478,6 +1478,9 @@ consult the installation file that came with this distribution, or visit \n\
                                                break;
 
                                case 'f': /* parse file */
+                                               if (script_file) {
+                                                       efree(script_file);
+                                               }
                                                script_file = estrdup(php_optarg);
                                                no_headers = 1;
                                                /* arguments after the file are considered script args */