Change gdb_realpath to return a unique_xmalloc_ptr
[deliverable/binutils-gdb.git] / gdb / source.c
index e2a507ddaaabb746bb479d3644bc3b6f90e32343..0453f922a297495a67ddb227f83bd128c7ad6bcf 100644 (file)
@@ -911,7 +911,7 @@ done:
       if (fd < 0)
        *filename_opened = NULL;
       else if ((opts & OPF_RETURN_REALPATH) != 0)
-       *filename_opened = gdb_realpath (filename);
+       *filename_opened = gdb_realpath (filename).release ();
       else
        *filename_opened = gdb_abspath (filename).release ();
     }
@@ -1050,7 +1050,7 @@ find_and_open_source (const char *filename,
       result = gdb_open_cloexec (*fullname, OPEN_MODE, 0);
       if (result >= 0)
        {
-         char *lpath = gdb_realpath (*fullname);
+         char *lpath = gdb_realpath (*fullname).release ();
 
          xfree (*fullname);
          *fullname = lpath;
This page took 0.023936 seconds and 4 git commands to generate.