progress-info-manager: Don't leak finished & cancelled infos

NautilusProgressInfoManager aquires a reference for every progress info
and keeps these references in a list. Upon destruction, it releases the
reference while unreffing each progress info.

However, when it removes finished and cancelled infos from the list, it
doesn't release the reference, effectively leaking it.

This bug is a old as the manager: a0f8947383
This commit is contained in:
Gary Li 2022-10-16 20:43:38 -04:00 committed by António Fernandes
parent 90d995453f
commit 166ad014f3

View file

@ -159,6 +159,7 @@ nautilus_progress_info_manager_remove_finished_or_cancelled_infos (NautilusProgr
if (nautilus_progress_info_get_is_finished (l->data) ||
nautilus_progress_info_get_is_cancelled (l->data))
{
g_object_unref (l->data);
self->progress_infos = g_list_remove (self->progress_infos,
l->data);
}