* mi-cmd-disas.c (mi_cmd_disassemble): Fix memory leak.
+2011-03-09 Michael Snyder <msnyder@vmware.com>
+
+ * mi-cmd-disas.c (mi_cmd_disassemble): Fix memory leak.
+
2011-03-09 Pedro Alves <pedro@codesourcery.com>
* nto-tdep.c (nto_find_and_open_solib): Constify local `base'.
int how_many = -1;
CORE_ADDR low = 0;
CORE_ADDR high = 0;
+ struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
/* Options processing stuff. */
int optind = 0;
case FILE_OPT:
file_string = xstrdup (optarg);
file_seen = 1;
+ make_cleanup (xfree, file_string);
break;
case LINE_OPT:
line_num = atoi (optarg);
file_string,
disasm_flags,
how_many, low, high);
+
+ do_cleanups (cleanups);
}