2007-08-03 Michael Snyder <msnyder@access-company.com>

* mi-cmd-var.c (mi_cmd_var_delete): Remove unused variable,
	stop memory leak, straighten out cleanups.
This commit is contained in:
Michael Snyder 2007-08-04 03:00:40 +00:00
parent 03b4bca2d7
commit 474d0d0c7a
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2007-08-03 Michael Snyder <msnyder@access-company.com>
* mi-cmd-var.c (mi_cmd_var_delete): Remove unused variable,
stop memory leak, straighten out cleanups.
* jv-lang.c (java_link_class_type): Guard against NULL.
2007-08-02 Michael Snyder <msnyder@access-company.com>

View File

@ -139,7 +139,6 @@ enum mi_cmd_result
mi_cmd_var_delete (char *command, char **argv, int argc)
{
char *name;
char *expr;
struct varobj *var;
int numdel;
int children_only_p = 0;
@ -167,13 +166,12 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
which would be the variable name. */
if (argc == 2)
{
expr = xstrdup (argv[1]);
if (strcmp (name, "-c") != 0)
error (_("mi_cmd_var_delete: Invalid option."));
children_only_p = 1;
xfree (name);
name = xstrdup (expr);
xfree (expr);
do_cleanups (old_cleanups);
name = xstrdup (argv[1]);
make_cleanup (free_current_contents, &name);
}
/* If we didn't error out, now NAME contains the name of the