aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-03-27 06:23:25 +0000
committerKevin Buettner <kevinb@redhat.com>2001-03-27 06:23:25 +0000
commit224d8953bf0a0d8932f48cab92e372b5ec1ac01f (patch)
treeb55cc545f5f607672b3cb19740f82177b71988f7
parentbc64be0c370b05730af0779edc3b94049f3178b2 (diff)
downloadgdb-224d8953bf0a0d8932f48cab92e372b5ec1ac01f.zip
gdb-224d8953bf0a0d8932f48cab92e372b5ec1ac01f.tar.gz
gdb-224d8953bf0a0d8932f48cab92e372b5ec1ac01f.tar.bz2
* solib-aix5.c (build_so_lib_from_mapfile): Fix xasprintf() usage.
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/solib-aix5.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f929449..56633d8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -5,6 +5,8 @@
(ia64_get_saved_register): Use alloca() to allocate register
buffers.
+ * solib-aix5.c (build_so_lib_from_mapfile): Fix xasprintf() usage.
+
2001-03-26 Kevin Buettner <kevinb@redhat.com>
* proc-utils.h (procfs_ctl_t): New typedef.
diff --git a/gdb/solib-aix5.c b/gdb/solib-aix5.c
index 9207c21..0d90877 100644
--- a/gdb/solib-aix5.c
+++ b/gdb/solib-aix5.c
@@ -193,13 +193,14 @@ build_so_list_from_mapfile (int pid, long match_mask, long match_val)
{
int mapbuf_allocation_size = 8192;
- char map_pathname[64];
+ char *map_pathname;
int map_fd;
/* Open the map file */
- xasprintf (map_pathname, "/proc/%d/map", pid);
+ xasprintf (&map_pathname, "/proc/%d/map", pid);
map_fd = open (map_pathname, O_RDONLY);
+ free (map_pathname);
if (map_fd < 0)
return 0;