This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[type-refcount] [commit] Fix a value leak by VAROBJ.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: archer at sourceware dot org
- Date: Sat, 7 Mar 2009 01:36:34 +0100
- Subject: [type-refcount] [commit] Fix a value leak by VAROBJ.
commit ef24aed64e5b773d8653ac8c497aa52acb3e4037
This patch is more or less unrelated to [type-refcount].
Fix `var->value' leak in free_variable().
* varobj.c (free_variable): Call value_free.
---
gdb/varobj.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 2ec6d90..0147ecb 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1512,6 +1512,8 @@ new_root_variable (void)
static void
free_variable (struct varobj *var)
{
+ value_free (var->value);
+
/* Free the expression if this is a root variable. */
if (is_root_p (var))
{
--
1.6.0.6