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

index 02a0e5d5849f0296e7026b874d4d91cd0e4e3ccc..9dc931c3931a1fd431dfc49a7612cf2e914798e5 100644 (file)
@@ -1409,6 +1409,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 */