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


> 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


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