]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use gdb::unique_xmalloc_ptr<> instead of a deleter that invokes free().
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 9 Jan 2018 21:35:17 +0000 (13:35 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 9 Jan 2018 21:35:17 +0000 (13:35 -0800)
commit262f62f57d987269152412a55c458a03adc6ddd6
treeff23df9bda29d6567d72d1640e0c4b6dc27660ff
parentb999e2038dbc54e2c8b1c390f8b8fe50d0f1d10a
Use gdb::unique_xmalloc_ptr<> instead of a deleter that invokes free().

Since xfree() always wraps free(), it is safe to use the xfree deleter
for buffers allocated by library routines such as kinfo_getvmmap() that
must be released via free().

gdb/ChangeLog:

* fbsd-nat.c (struct free_deleter): Remove.
(fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
gdb/ChangeLog
gdb/fbsd-nat.c