diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2025-06-05 16:30:25 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2025-06-06 15:22:02 -0400 |
commit | 8d46965efced0843b1ed94fd0517055e737f263e (patch) | |
tree | 3b6bc52ac919072b810af12f70f40350215aaec5 | |
parent | 7ad52074d2cb2478372fe16cf9bf1037f7ff67d4 (diff) | |
download | binutils-8d46965efced0843b1ed94fd0517055e737f263e.zip binutils-8d46965efced0843b1ed94fd0517055e737f263e.tar.gz binutils-8d46965efced0843b1ed94fd0517055e737f263e.tar.bz2 |
gdb/amd-dbgapi: remove one xfree
Replace a manual xfree with unique_xmalloc_ptr.
Change-Id: Id4d2065e3294c4761fe3c852962360712b53d7a8
Approved-By: Tom Tromey <tom@tromey.com>
Approved-by: Lancelot Six <lancelot.six@amd.com> (amdgpu)
-rw-r--r-- | gdb/amd-dbgapi-target.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c index 8e067b6..819b373 100644 --- a/gdb/amd-dbgapi-target.c +++ b/gdb/amd-dbgapi-target.c @@ -1860,13 +1860,14 @@ amd_dbgapi_target::update_thread_list () if (changed == AMD_DBGAPI_CHANGED_NO) continue; + gdb::unique_xmalloc_ptr<amd_dbgapi_wave_id_t> wave_list_holder + (wave_list); + /* Create a set and free the wave list. */ std::set<ptid_t::tid_type> threads; for (size_t i = 0; i < count; ++i) threads.emplace (wave_list[i].handle); - xfree (wave_list); - /* Prune the wave_ids that already have a thread_info. Any thread_info which does not have a corresponding wave_id represents a wave which is gone at this point and should be deleted. */ |