2001-05-10 Fernando Nasser <fnasser@redhat.com>
authorFernando Nasser <fnasser@redhat.com>
Thu, 10 May 2001 16:57:01 +0000 (16:57 +0000)
committerFernando Nasser <fnasser@redhat.com>
Thu, 10 May 2001 16:57:01 +0000 (16:57 +0000)
* varobj.c (c_number_of_children): Fix memory leak. Delete unwanted old
variables, not just unregister them.

gdb/ChangeLog
gdb/varobj.c

index 52287b459c4fdee7d677529b2243b8f06d05c3b5..f710253071b7e347d408745b791d08746013cb55 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2001-05-10  Fernando Nasser  <fnasser@redhat.com>
 
        * varobj.c (c_number_of_children): Check for target type of void*,
index c61c313f088a4792fe9803e9572176b48e5670b1..c62aecffd65fd0aacf1f95e93a91c4fcf83f8fcd 100644 (file)
@@ -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
            {