Re-fix leak in source.c (open_source_file).
Leak fixed in '8e6a5953e1
Fix 4K leak in open_source_file' has been partially undone by '2179fbc36d
Return scoped_fd from open_source_file'. Re-add the transfer of current s->fullname to the unique_xmalloc_ptr fullname given to find_and_open_source.
This commit is contained in:
parent
f5e0fe29ee
commit
5446094655
2 changed files with 9 additions and 1 deletions
|
@ -1068,7 +1068,7 @@ open_source_file (struct symtab *s)
|
|||
if (!s)
|
||||
return scoped_fd (-1);
|
||||
|
||||
gdb::unique_xmalloc_ptr<char> fullname;
|
||||
gdb::unique_xmalloc_ptr<char> fullname (s->fullname);
|
||||
s->fullname = NULL;
|
||||
scoped_fd fd = find_and_open_source (s->filename, SYMTAB_DIRNAME (s),
|
||||
&fullname);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue