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)
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. */