[4/4] windows-nat: Use gdb_realpath
Checks
Commit Message
Use gdb_realpath instead of realpath in windows-nat.c:windows_make_so,
so that we don't have to manually call free.
Change-Id: Id3cda7e177ac984c9a5f7c23f354e72bd561edff
---
gdb/windows-nat.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
@@ -891,12 +891,9 @@ windows_make_so (const char *name, LPVOID load_addr)
}
else
{
- char *rname = realpath (name, NULL);
+ gdb::unique_xmalloc_ptr<char> rname = gdb_realpath (name);
if (rname != nullptr)
- {
- so->name = rname;
- free (rname);
- }
+ so->name = rname.get ();
else
{
warning (_("dll path for \"%s\" inaccessible"), name);