public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix memory leak in loop header copying
@ 2023-06-13 12:21 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-06-13 12:21 UTC (permalink / raw)
  To: gcc-patches


Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	* tree-ssa-loop-ch.cc (ch_base::copy_headers): Free loop BBs.
---
 gcc/tree-ssa-loop-ch.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc
index 7fdef3bb11a..22252bee135 100644
--- a/gcc/tree-ssa-loop-ch.cc
+++ b/gcc/tree-ssa-loop-ch.cc
@@ -642,6 +642,7 @@ ch_base::copy_headers (function *fun)
 	       if (stmt_can_terminate_bb_p (gsi_stmt (bsi)))
 		 precise = false;
 	   }
+	  free (bbs);
 	}
       if (precise
 	  && get_max_loop_iterations_int (loop) == 1)
-- 
2.35.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-13 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 12:21 [PATCH] Fix memory leak in loop header copying Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).