From: Richard Biener Date: Thu, 13 Nov 2025 12:53:43 +0000 (+0100) Subject: Fix memory leak in pass_x86_cse X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bfa8b37da8d22eb907994c08006e6aafd755e2e;p=thirdparty%2Fgcc.git Fix memory leak in pass_x86_cse The following makes sure to delete the loads we previously allocated with new. gcc/ * config/i386/i386-features.cc (pass_x86_cse::x86_cse): Delete loads. --- diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 8e277843f23..f1f118d5b75 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -4810,6 +4810,9 @@ pass_x86_cse::x86_cse (void) df_process_deferred_rescans (); } + FOR_EACH_VEC_ELT (loads, i, load) + delete load; + df_clear_flags (DF_DEFER_INSN_RESCAN); timevar_pop (TV_MACH_DEP);