From 44066f23b7c5a14a74f04ecfc723acea7e9504c8 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 17 Apr 2007 18:51:34 +0000 Subject: [PATCH] MFH: fix leak appearing when more than one -f option specified --- sapi/cgi/cgi_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index e8f277cfc3..4b76954568 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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 */ -- 2.50.1