diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2014-05-22 08:47:42 +0200 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2014-06-25 09:54:31 +0200 |
commit | 1d1f1ccb331f1fe9825c3bb6f6231a3aeb560d6f (patch) | |
tree | 873d0ea4e5a1045e06bbbce37ef9e3f8ce54c0f3 /gdb/procfs.c | |
parent | 31f0c4c1c653b59ce8552402ecc1b3249273f2de (diff) | |
download | gdb-1d1f1ccb331f1fe9825c3bb6f6231a3aeb560d6f.zip gdb-1d1f1ccb331f1fe9825c3bb6f6231a3aeb560d6f.tar.gz gdb-1d1f1ccb331f1fe9825c3bb6f6231a3aeb560d6f.tar.bz2 |
make_corefile_notes: have caller free returned memory
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.
gdb/
* 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.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index cbb44ce..4caaf7b 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -5522,7 +5522,6 @@ procfs_make_note_section (struct target_ops *self, bfd *obfd, int *note_size) xfree (auxv); } - make_cleanup (xfree, note_data); return note_data; } #else /* !Solaris */ |