aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-05-03 17:28:08 -0600
committerTom Tromey <tom@tromey.com>2017-09-29 21:12:13 -0600
commit9813429a729dbcd761dfbb02d2d7a3449af0881d (patch)
tree7126b168be181116466378f3f614404681d67427 /gdb/mi
parent2d6960b4568869baaa3cb40f75caed4021938e1c (diff)
downloadgdb-9813429a729dbcd761dfbb02d2d7a3449af0881d.zip
gdb-9813429a729dbcd761dfbb02d2d7a3449af0881d.tar.gz
gdb-9813429a729dbcd761dfbb02d2d7a3449af0881d.tar.bz2
Don't copy a string in mi_cmd_disassemble
This string copy in mi_cmd_disassemble seems not to be needed, so don't do it. gdb/ChangeLog 2017-09-29 Tom Tromey <tom@tromey.com> * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmd-disas.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index d0f9b0b..b3d6245 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -74,7 +74,6 @@ mi_cmd_disassemble (const char *command, char **argv, int argc)
int how_many = -1;
CORE_ADDR low = 0;
CORE_ADDR high = 0;
- struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
/* Options processing stuff. */
int oind = 0;
@@ -104,9 +103,8 @@ mi_cmd_disassemble (const char *command, char **argv, int argc)
switch ((enum opt) opt)
{
case FILE_OPT:
- file_string = xstrdup (oarg);
+ file_string = oarg;
file_seen = 1;
- make_cleanup (xfree, file_string);
break;
case LINE_OPT:
line_num = atoi (oarg);
@@ -190,6 +188,4 @@ mi_cmd_disassemble (const char *command, char **argv, int argc)
gdb_disassembly (gdbarch, uiout,
disasm_flags,
how_many, low, high);
-
- do_cleanups (cleanups);
}