diff --git a/gio/gapplication.c b/gio/gapplication.c index d638401f1..0a936558f 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -639,6 +639,12 @@ g_application_finalize (GObject *object) if (g_application_get_default () == application) g_application_set_default (NULL); + if (application->priv->app_menu) + g_object_unref (application->priv->app_menu); + + if (application->priv->menubar) + g_object_unref (application->priv->menubar); + G_OBJECT_CLASS (g_application_parent_class) ->finalize (object); } diff --git a/gio/gmenumarkup.c b/gio/gmenumarkup.c index 0eb59f7d0..24a2dfb1d 100644 --- a/gio/gmenumarkup.c +++ b/gio/gmenumarkup.c @@ -117,6 +117,7 @@ g_menu_markup_pop_frame (GMenuMarkupState *state) { g_assert (prev->menu != NULL); g_menu_append_item (prev->menu, state->frame.item); + g_object_unref (state->frame.item); } state->frame = *prev;