Fix memory leak in loop header copying

* tree-ssa-loop-ch.cc (ch_base::copy_headers): Free loop BBs.
This commit is contained in:
Richard Biener 2023-06-13 12:39:46 +02:00
parent 47c3144c2f
commit 2270f4fdaa
1 changed files with 1 additions and 0 deletions

View File

@ -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)