aboutsummaryrefslogtreecommitdiff
path: root/gdb/auxv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/auxv.c')
-rw-r--r--gdb/auxv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/auxv.c b/gdb/auxv.c
index dda14f2..13bf9c3 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -46,13 +46,11 @@ procfs_xfer_auxv (gdb_byte *readbuf,
ULONGEST len,
ULONGEST *xfered_len)
{
- char *pathname;
int fd;
ssize_t l;
- pathname = xstrprintf ("/proc/%d/auxv", inferior_ptid.pid ());
+ std::string pathname = string_printf ("/proc/%d/auxv", inferior_ptid.pid ());
fd = gdb_open_cloexec (pathname, writebuf != NULL ? O_WRONLY : O_RDONLY, 0);
- xfree (pathname);
if (fd < 0)
return TARGET_XFER_E_IO;