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:
parent
03b4bca2d7
commit
474d0d0c7a
|
@ -1,5 +1,8 @@
|
||||||
2007-08-03 Michael Snyder <msnyder@access-company.com>
|
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.
|
* jv-lang.c (java_link_class_type): Guard against NULL.
|
||||||
|
|
||||||
2007-08-02 Michael Snyder <msnyder@access-company.com>
|
2007-08-02 Michael Snyder <msnyder@access-company.com>
|
||||||
|
|
|
@ -139,7 +139,6 @@ enum mi_cmd_result
|
||||||
mi_cmd_var_delete (char *command, char **argv, int argc)
|
mi_cmd_var_delete (char *command, char **argv, int argc)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
char *expr;
|
|
||||||
struct varobj *var;
|
struct varobj *var;
|
||||||
int numdel;
|
int numdel;
|
||||||
int children_only_p = 0;
|
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. */
|
which would be the variable name. */
|
||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
{
|
{
|
||||||
expr = xstrdup (argv[1]);
|
|
||||||
if (strcmp (name, "-c") != 0)
|
if (strcmp (name, "-c") != 0)
|
||||||
error (_("mi_cmd_var_delete: Invalid option."));
|
error (_("mi_cmd_var_delete: Invalid option."));
|
||||||
children_only_p = 1;
|
children_only_p = 1;
|
||||||
xfree (name);
|
do_cleanups (old_cleanups);
|
||||||
name = xstrdup (expr);
|
name = xstrdup (argv[1]);
|
||||||
xfree (expr);
|
make_cleanup (free_current_contents, &name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we didn't error out, now NAME contains the name of the
|
/* If we didn't error out, now NAME contains the name of the
|
||||||
|
|
Loading…
Reference in New Issue