aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 9813041..886e17f 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -128,10 +128,10 @@ set_gdb_data_directory (const char *new_datadir)
isn't canonical, but that's ok. */
if (!IS_ABSOLUTE_PATH (gdb_datadir))
{
- char *abs_datadir = gdb_abspath (gdb_datadir);
+ gdb::unique_xmalloc_ptr<char> abs_datadir = gdb_abspath (gdb_datadir);
xfree (gdb_datadir);
- gdb_datadir = abs_datadir;
+ gdb_datadir = abs_datadir.release ();
}
}