From 5da5d8a02c6799e60970fef72ee8c1c3d033a5e5 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 9 Feb 2021 09:50:04 +0100 Subject: [PATCH] if-to-switch: fix a memory leak gcc/ChangeLog: PR tree-optimization/99002 * gimple-if-to-switch.cc (find_conditions): Fix memory leak in the function. --- gcc/gimple-if-to-switch.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/gimple-if-to-switch.cc b/gcc/gimple-if-to-switch.cc index 1712fc4c8b3..f39662be3e6 100644 --- a/gcc/gimple-if-to-switch.cc +++ b/gcc/gimple-if-to-switch.cc @@ -447,10 +447,9 @@ find_conditions (basic_block bb, info->record_phi_mapping (info->m_false_edge, &info->m_false_edge_phi_mapping); conditions_in_bbs->put (bb, info); + return; } - return; - exit: delete info; } -- 2.30.2