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

Joel Brobecker
2008-09-13T22:35:42Z

> So, I think this probably isn't worth pursuing.

I agree.

> I did find a few stray uses of free. I can send that patch if you
> like. I'm not even sure if this matters -- I suppose the
> justification for xfree is not as strong as that for xmalloc.

Yes, in practice xfree doesn't do anything more than free. I looked
at the code, and it only contains a check against NULL, right now.
The C standard requires that free does nothing when passed a NULL
pointer. So unless we're building GDB with a screwy C compiler,
it's strictly equivalent to calling free.

Still, I think it'd be nice to get rid of these. In desperate
situations, one might want to locally hack these to track memory
issues...

--
Joel