From: Mark Kettenis <kettenis@science.uva.nl>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix xasprintf() usage in solib-aix5.c
Date: Tue, 27 Mar 2001 01:46:00 -0000 [thread overview]
Message-ID: <s3in1a7wnmf.fsf@debye.wins.uva.nl> (raw)
In-Reply-To: <1010327062855.ZM2972@ocotillo.lan>
Kevin Buettner <kevinb@cygnus.com> writes:
> I've just committed the change below.
>
> * solib-aix5.c (build_so_lib_from_mapfile): Fix xasprintf() usage.
>
> Index: solib-aix5.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/solib-aix5.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 solib-aix5.c
> --- solib-aix5.c 2001/03/16 18:06:44 1.7
> +++ solib-aix5.c 2001/03/27 06:18:58
> @@ -193,13 +193,14 @@ build_so_list_from_mapfile (int pid, lon
>
> {
> 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);
Shouldn't that be xfree()?
> if (map_fd < 0)
> return 0;
>
next prev parent reply other threads:[~2001-03-27 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-26 22:29 Kevin Buettner
2001-03-27 1:46 ` Mark Kettenis [this message]
2001-03-27 1:57 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s3in1a7wnmf.fsf@debye.wins.uva.nl \
--to=kettenis@science.uva.nl \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox