mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
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)
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user