if-to-switch: fix a memory leak
authorMartin Liska <mliska@suse.cz>
Tue, 9 Feb 2021 08:50:04 +0000 (09:50 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 10 Feb 2021 08:25:42 +0000 (09:25 +0100)
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

index 1712fc4c8b3da40e83df6e200bfdbcc626e41df8..f39662be3e698f96a11f1e59e1bfee212c959640 100644 (file)
@@ -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;
 }