utils: Don't leak GMainContextPopDefault contextes

We're creating a new one, making it the default, and on destroy
we pop it, but since we're not also destroying it we're leaking the
entire context!
This commit is contained in:
Alexander Larsson
2019-12-16 10:32:57 +01:00
committed by Alexander Larsson
parent 93a7718678
commit dd6df7589e

View File

@@ -645,7 +645,10 @@ flatpak_main_context_pop_default_destroy (void *p)
GMainContext *main_context = p;
if (main_context)
g_main_context_pop_thread_default (main_context);
{
g_main_context_pop_thread_default (main_context);
g_main_context_unref (main_context);
}
}
static inline GMainContextPopDefault *