This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 6/6] Fix memory leak in tree-chkp.c


gcc/ChangeLog:

2015-11-23  Martin Liska  <mliska@suse.cz>

	* tree-chkp.c (chkp_make_static_bounds): Release buffer
	used for string.
---
 gcc/tree-chkp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index 34d9dfc..8b6381f 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.6.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]