Fix memory leak in tree-chkp.c
authorMartin Liska <mliska@suse.cz>
Fri, 27 Nov 2015 08:39:00 +0000 (09:39 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 27 Nov 2015 08:39:00 +0000 (08:39 +0000)
* tree-chkp.c (chkp_make_static_bounds): Release buffer
used for string.

From-SVN: r230997

gcc/ChangeLog
gcc/tree-chkp.c

index f83062c2d4e8f097f7f7ff3f2488ef48d0b6728a..66368d3207bf77f1e85090ab47369f20b98f6169 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-27  Martin Liska  <mliska@suse.cz>
+
+       * tree-chkp.c (chkp_make_static_bounds): Release buffer
+       used for string.
+
 2015-11-27  Martin Liska  <mliska@suse.cz>
 
        * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
index 34d9dfc47f12b80c3c59c652f057a7f61b77e74e..8b6381f7bb96538f2b5317cacb87d49e123bc71a 100644 (file)
@@ -2910,6 +2910,8 @@ chkp_make_static_bounds (tree obj)
                            pointer_bounds_type_node);
     }
 
+  free (bnd_var_name);
+
   TREE_PUBLIC (bnd_var) = 0;
   TREE_USED (bnd_var) = 1;
   TREE_READONLY (bnd_var) = 0;