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
> My understanding is that on all systems in active use, free(NULL)
> works fine. Jim Meyering recently removed if (x) free (x) from a
> bunch of GNU programs...
We might end up doing it in GDB as well, not sure what the others think.
> I also changed a use of asprintf, because gdbint.texinfo clearly
> states that this function is not to be used. (It is the only use in
> gdb.)
Thanks!
> 2008-09-13 Tom Tromey <tromey@redhat.com>
>
> * varobj.c (varobj_set_display_format): Use xfree.
> * tracepoint.c (stringify_collection_list): Use xfree.
> * remote-fileio.c (remote_fileio_reset): Use xfree.
> * mipsread.c (read_alphacoff_dynamic_symtab): Use xfree.
> * dfp.c (decimal_from_floating): Use xfree, xstrprintf. Don't use
> asprintf.
> * cp-support.c (mangled_name_to_comp): Use xfree.
>
> Ok if it succeeds?
Yes. Thanks for doing this.
--
Joel