This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 6/6] Fix memory leak in tree-chkp.c
- From: marxin <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Nov 2015 14:48:47 +0100
- Subject: [PATCH 6/6] Fix memory leak in tree-chkp.c
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1448286565 dot git dot mliska at suse dot cz>
- Resent-user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
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