From 74dddad306a1f78d799830f4d3dd573d381b6d13 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 17 Aug 2007 23:17:30 +0000 Subject: [PATCH] 2007-08-17 Michael Snyder * varobj.c (value_of_root): Memory leak. --- gdb/ChangeLog | 2 ++ gdb/varobj.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 908a3c8727a..821d62f614b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-17 Michael Snyder + * varobj.c (value_of_root): Memory leak. + * gdbtypes.h (virtual_base_list): Remove export decl. * gdbtypes.c (virtual_base_list): Make static. Not called outside. (virtual_base_index): Memory leak. diff --git a/gdb/varobj.c b/gdb/varobj.c index be6df5e8388..fb3d6962296 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1741,6 +1741,8 @@ value_of_root (struct varobj **var_handle, int *type_changed) var = *var_handle; *type_changed = 1; } + xfree (old_type); + xfree (new_type); } else { -- 2.30.2