* solib-aix5.c (build_so_lib_from_mapfile): Fix xasprintf() usage.
authorKevin Buettner <kevinb@redhat.com>
Tue, 27 Mar 2001 06:23:25 +0000 (06:23 +0000)
committerKevin Buettner <kevinb@redhat.com>
Tue, 27 Mar 2001 06:23:25 +0000 (06:23 +0000)
gdb/ChangeLog
gdb/solib-aix5.c

index f9294498343ff3804f7dcd1afd87f1a1d0e25e0a..56633d812f7ee8eeeddb5f487b6d685795be2d79 100644 (file)
@@ -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.
index 9207c2144909ad0819ac3583b7afe780ad9cb87f..0d908770d8b53702521462cdba29b298454615e7 100644 (file)
@@ -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;