This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix minor memory leak in symfile.c
On Wed, Sep 17, 2008 at 06:04:18PM -0700, Joel Brobecker wrote:
> > When I added that use of asprintf, I checked that libiberty provides it
> > if the underlying OS doesn't. I thought we could use anything covered by
> > libiberty. Maybe not?
>
> Not sure. I don't think that it is a portability issue, but rather
> to provide an interface where any issues causes an error to be thrown.
> That way, no need to check the pointer returned, nor the status code,
> and thus it's not possible to forget. I think it's the same as xmalloc.
Yes - thus xstrprintf, I believe.
--
Daniel Jacobowitz
CodeSourcery