From: Jakub Jelinek Date: Sat, 9 Dec 2023 09:28:37 +0000 (+0100) Subject: driver: Fix memory leak [PR93019] X-Git-Tag: basepoints/gcc-15~3783 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36be2a0e91c76da4afcd5ddc37e03f5800396387;p=thirdparty%2Fgcc.git driver: Fix memory leak [PR93019] driver:finalize used by JIT clears the mdswitches pointer; if it was allocated before, that leaks the memory. 2023-12-09 Costas Argyris Jakub Jelinek PR driver/93019 * gcc.cc (driver::finalize): Call XDELETEVEC on mdswitches before clearing it. Signed-off-by: Costas Argyris --- diff --git a/gcc/gcc.cc b/gcc/gcc.cc index d73fb0414e98..701f5cdfb59c 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -11368,6 +11368,7 @@ driver::finalize () input_from_pipe = 0; suffix_subst = NULL; + XDELETEVEC (mdswitches); mdswitches = NULL; n_mdswitches = 0;