profiler: Free ThreadInfo when a thread unregisters
This avoids leaking the the ThreadInfo object when a thread unregisters.
Fixes: e16d68372
("profiler: Add API to register profiler threads")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3076>
This commit is contained in:
parent
f49b2a3c7d
commit
edc5d2a933
@ -343,7 +343,7 @@ meta_profiler_unregister_thread (MetaProfiler *profiler,
|
|||||||
|
|
||||||
if (thread_info->main_context == main_context)
|
if (thread_info->main_context == main_context)
|
||||||
{
|
{
|
||||||
profiler->threads = g_list_remove_link (profiler->threads, l);
|
profiler->threads = g_list_delete_link (profiler->threads, l);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user