This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix minor memory leak in symfile.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 13 Sep 2008 10:17:23 -0700
- Subject: Re: RFA: fix minor memory leak in symfile.c
- References: <m3bpysugn4.fsf@fleche.redhat.com>
:REVIEWMAIL:
> While auditing other callers of build_id_bfd_get, I found a use of
> 'free', so I fixed that as well. (Perhaps we ought to poison "free"?)
I think that's a good idea, since I don't think there is any case
besides the xfree implementation where we want to call free. Same
for malloc as well. But I'm not very familiar with the pros and
cons of this GCC pragma.
> 2008-09-13 Tom Tromey <tromey@redhat.com>
>
> * symfile.c (build_id_verify): Free 'found'.
> (find_separate_debug_file): Use xfree, not free.
Looks good :).
--
Joel