Re: [PATCH v2 1/3] make_corefile_notes: have caller free returned memory

Pedro Alves
2014-06-24T12:58:57Z

On 06/24/2014 09:51 AM, Markus Metzger wrote:
> The various make_corefile_notes implementations for gdbarch as well as target
> currently make an xfree cleanup on the data they return. This causes problems
> when trying to put a TRY_CATCH around the make_corefile_notes call.
> Specifically, we get a stale cleanup error in restore_my_cleanups.
>
> Omit the make_cleanup and have the caller free the memory.
>
> 2014-06-24 Markus Metzger <markus.t.metzger@intel.com>
>
> * fbsd-nat.c (fbsd_make_corefile_notes): Remove make_cleanup call.
> * gcore.c (write_gcore_file): Free memory returned from
> make_corefile_notes.
> * linux-tdep.c (linux_make_corefile_notes): Remove make_cleanup call.
> * procfs.c (procfs_make_note_section): Remove make_cleanup call.

OK.

--
Pedro Alves