From: Richard Biener Date: Fri, 17 Mar 2017 11:03:32 +0000 (+0000) Subject: re PR tree-optimization/80048 (gcc/sese.c: PVS-Studio: Improper Release of Memory... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61c81999bfd6edc4fa414bba2acdfa502fbf07d4;p=gcc.git re PR tree-optimization/80048 (gcc/sese.c: PVS-Studio: Improper Release of Memory Before Removing Last Reference (CWE-401)) 2017-03-17 Richard Biener PR tree-optimization/80048 * sese.c (free_sese_info): Properly release rename_map and copied_bb_map elements. From-SVN: r246217 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d0ed5ce3c57..925709bdab7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-17 Richard Biener + + PR tree-optimization/80048 + * sese.c (free_sese_info): Properly release rename_map and + copied_bb_map elements. + 2017-03-16 Alexandre Oliva * gimple-ssa-store-merging.c (struct imm_store_chain_info): diff --git a/gcc/sese.c b/gcc/sese.c index ed0e8fb9734..3279eadd12e 100644 --- a/gcc/sese.c +++ b/gcc/sese.c @@ -199,11 +199,11 @@ free_sese_info (sese_info_p region) region->loop_nest.release (); for (rename_map_t::iterator it = region->rename_map->begin (); - it != region->rename_map->begin (); ++it) + it != region->rename_map->end (); ++it) (*it).second.release (); for (bb_map_t::iterator it = region->copied_bb_map->begin (); - it != region->copied_bb_map->begin (); ++it) + it != region->copied_bb_map->end (); ++it) (*it).second.release (); delete region->rename_map;