RFA: fix minor memory leak in symfile.c

Joel Brobecker brobecker@adacore.com
Thu Sep 18 01:04:00 GMT 2008


> 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.

-- 
Joel



More information about the Gdb-patches mailing list