timeline: fix leak of timeline source

g_source_destroy doesn't free memory, just removes the source from its
main context. We have to do both. (g_source_unref() might call
g_source_destroy() if it has the last ref, but if something else has
another ref, then disaster could result if we don't call it manually.)
This commit is contained in:
Michael Catanzaro
2020-04-15 21:18:16 +00:00
committed by Georges Basile Stavracas Neto
parent f1d20126dc
commit 60c3c26ad6
+3 -1
View File
@@ -681,7 +681,9 @@ gcal_timeline_finalize (GObject *object)
g_clear_pointer (&self->calendars, g_hash_table_destroy);
g_clear_pointer (&self->subscribers, g_hash_table_destroy);
g_clear_pointer (&self->subscriber_ranges, gcal_range_tree_unref);
g_clear_pointer (&self->timeline_source, g_source_destroy);
g_source_destroy (self->timeline_source);
g_clear_pointer (&self->timeline_source, g_source_unref);
if (self->event_queue)
{