From: Antony Dovgal Date: Tue, 17 Apr 2007 18:51:24 +0000 (+0000) Subject: fix leak appearing when more than one -f option specified X-Git-Tag: RELEASE_1_2_0~297 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2f169ebf835f80d829b83a701eb80af7076c529;p=php fix leak appearing when more than one -f option specified --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 02a0e5d584..9dc931c393 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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 */