This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]