From: Martin Liska Date: Tue, 9 Feb 2021 08:50:04 +0000 (+0100) Subject: if-to-switch: fix a memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5da5d8a02c6799e60970fef72ee8c1c3d033a5e5;p=gcc.git 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. --- 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; }