aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/source.c b/gdb/source.c
index ec0ea3b..3cdf0b9 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1070,7 +1070,8 @@ open_source_file (struct symtab *s)
if (!s)
return -1;
- gdb::unique_xmalloc_ptr<char> fullname;
+ gdb::unique_xmalloc_ptr<char> fullname (s->fullname);
+ s->fullname = NULL;
int fd = find_and_open_source (s->filename, SYMTAB_DIRNAME (s), &fullname);
s->fullname = fullname.release ();
return fd;