From 2f0fc50514322ce1531aafe9eae7f9ecde482f8b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 27 Nov 2015 09:39:00 +0100 Subject: [PATCH] Fix memory leak in tree-chkp.c * tree-chkp.c (chkp_make_static_bounds): Release buffer used for string. From-SVN: r230997 --- gcc/ChangeLog | 5 +++++ gcc/tree-chkp.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f83062c2d4e..66368d3207b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-11-27 Martin Liska + + * tree-chkp.c (chkp_make_static_bounds): Release buffer + used for string. + 2015-11-27 Martin Liska * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c index 34d9dfc47f1..8b6381f7bb9 100644 --- a/gcc/tree-chkp.c +++ b/gcc/tree-chkp.c @@ -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; -- 2.30.2