This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

[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


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