aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2001-05-10 16:57:01 +0000
committerFernando Nasser <fnasser@redhat.com>2001-05-10 16:57:01 +0000
commitf7635dd9207587ecb51370172ac20016fa30c1dc (patch)
tree01f1c855a9946e48cba6a19c1a975da9b5c0e498 /gdb/varobj.c
parent0755e6c1ab7e46e00d170a3216987008cd302715 (diff)
downloadgdb-f7635dd9207587ecb51370172ac20016fa30c1dc.zip
gdb-f7635dd9207587ecb51370172ac20016fa30c1dc.tar.gz
gdb-f7635dd9207587ecb51370172ac20016fa30c1dc.tar.bz2
2001-05-10 Fernando Nasser <fnasser@redhat.com>
* varobj.c (c_number_of_children): Fix memory leak. Delete unwanted old variables, not just unregister them.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index c61c313..c62aecf 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1639,7 +1639,7 @@ value_of_root (struct varobj **var_handle, int *type_changed)
{
tmp_var->obj_name =
savestring (var->obj_name, strlen (var->obj_name));
- uninstall_variable (var);
+ varobj_delete (var, NULL, 0);
}
else
{