aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index cf6e540..ffcc364 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -151,12 +151,9 @@ get_inferior_args (void)
{
if (current_inferior ()->argc != 0)
{
- char *n;
-
- n = construct_inferior_arguments (current_inferior ()->argc,
- current_inferior ()->argv);
- set_inferior_args (n);
- xfree (n);
+ std::string n = construct_inferior_arguments (current_inferior ()->argc,
+ current_inferior ()->argv);
+ set_inferior_args (n.c_str ());
}
if (current_inferior ()->args == NULL)