proc-events.c: fix compilation on Solaris
[deliverable/binutils-gdb.git] / gdb / psymtab.c
index dc13fd560d8972de72b843b53ad8c46b9d22e52c..ac0ee0a5a64c592b2c2807d354b6d06bac012a8b 100644 (file)
@@ -1203,14 +1203,14 @@ psymtab_to_fullname (struct partial_symtab *ps)
      to handle cases like the file being moved.  */
   if (ps->fullname == NULL)
     {
-      int fd = find_and_open_source (ps->filename, ps->dirname, &ps->fullname);
+      gdb::unique_xmalloc_ptr<char> fullname;
+      int fd = find_and_open_source (ps->filename, ps->dirname, &fullname);
+      ps->fullname = fullname.release ();
 
       if (fd >= 0)
        close (fd);
       else
        {
-         gdb::unique_xmalloc_ptr<char> fullname;
-
          /* rewrite_source_path would be applied by find_and_open_source, we
             should report the pathname where GDB tried to find the file.  */
 
This page took 0.024216 seconds and 4 git commands to generate.