diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-12-09 10:28:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-12-09 10:28:37 +0100 |
commit | 36be2a0e91c76da4afcd5ddc37e03f5800396387 (patch) | |
tree | d0bae62fec6ff1c73f7d0dcf285b712fb43d455e /gcc/gcc.cc | |
parent | 388ab03975c5c6b3c434ebb95c56c07ea8932486 (diff) | |
download | gcc-36be2a0e91c76da4afcd5ddc37e03f5800396387.zip gcc-36be2a0e91c76da4afcd5ddc37e03f5800396387.tar.gz gcc-36be2a0e91c76da4afcd5ddc37e03f5800396387.tar.bz2 |
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 <costas.argyris@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR driver/93019
* gcc.cc (driver::finalize): Call XDELETEVEC on mdswitches before
clearing it.
Signed-off-by: Costas Argyris <costas.argyris@gmail.com>
Diffstat (limited to 'gcc/gcc.cc')
-rw-r--r-- | gcc/gcc.cc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -11368,6 +11368,7 @@ driver::finalize () input_from_pipe = 0; suffix_subst = NULL; + XDELETEVEC (mdswitches); mdswitches = NULL; n_mdswitches = 0; |