Re: RFA: fix minor memory leak in symfile.c

Daniel Jacobowitz
2008-09-18T02:31:47Z

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