Change gdb_realpath to return a unique_xmalloc_ptr
[deliverable/binutils-gdb.git] / gdb / main.c
index 886e17fcf97d512a014598e95c43eda579091811..a0646edad6024f505532db43577684b1bff49498 100644 (file)
@@ -120,7 +120,7 @@ set_gdb_data_directory (const char *new_datadir)
     warning (_("%s is not a directory."), new_datadir);
 
   xfree (gdb_datadir);
-  gdb_datadir = gdb_realpath (new_datadir);
+  gdb_datadir = gdb_realpath (new_datadir).release ();
 
   /* gdb_realpath won't return an absolute path if the path doesn't exist,
      but we still want to record an absolute path here.  If the user entered
@@ -1083,7 +1083,8 @@ captured_main_1 (struct captured_main_args *context)
      the same as the $HOME/.gdbinit file (it should exist, also).  */
   if (local_gdbinit)
     {
-      auto_load_local_gdbinit_pathname = gdb_realpath (local_gdbinit);
+      auto_load_local_gdbinit_pathname
+       = gdb_realpath (local_gdbinit).release ();
 
       if (!inhibit_gdbinit && auto_load_local_gdbinit
          && file_is_auto_load_safe (local_gdbinit,
This page took 0.025438 seconds and 4 git commands to generate.