re PR tree-optimization/80048 (gcc/sese.c: PVS-Studio: Improper Release of Memory...
authorRichard Biener <rguenther@suse.de>
Fri, 17 Mar 2017 11:03:32 +0000 (11:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Mar 2017 11:03:32 +0000 (11:03 +0000)
2017-03-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/80048
* sese.c (free_sese_info): Properly release rename_map and
copied_bb_map elements.

From-SVN: r246217

gcc/ChangeLog
gcc/sese.c

index d0ed5ce3c57b19fe6f1e70c68330ed8a510dbc62..925709bdab73964ee8f7211d220fa8a49ba4c2b4 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-17  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/80048
+       * sese.c (free_sese_info): Properly release rename_map and
+       copied_bb_map elements.
+
 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
 
        * gimple-ssa-store-merging.c (struct imm_store_chain_info):
index ed0e8fb97344558af05ed988c2b9ec22122d5d0a..3279eadd12e20ff8d794ed14b7f83b4dd536a272 100644 (file)
@@ -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;