[gnome-builder] ide-editor-frame: fix action group leak



commit a966334747131ed1a37141ce36d67a168c59e643
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Sat Mar 12 14:12:43 2016 +0100

    ide-editor-frame: fix action group leak
    
    not using g_autoptr in this case is more understandable
    to show that we re-use the group var for another
    group and need to release it too.

 libide/editor/ide-editor-frame-actions.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libide/editor/ide-editor-frame-actions.c b/libide/editor/ide-editor-frame-actions.c
index 775fcd6..68bf99b 100644
--- a/libide/editor/ide-editor-frame-actions.c
+++ b/libide/editor/ide-editor-frame-actions.c
@@ -174,7 +174,7 @@ static const GActionEntry IdeEditorFrameSearchActions[] = {
 void
 ide_editor_frame_actions_init (IdeEditorFrame *self)
 {
-  g_autoptr(GSimpleActionGroup) group = NULL;
+  GSimpleActionGroup *group;
 
   g_assert (IDE_IS_EDITOR_FRAME (self));
 
@@ -182,9 +182,11 @@ ide_editor_frame_actions_init (IdeEditorFrame *self)
   g_action_map_add_action_entries (G_ACTION_MAP (group), IdeEditorFrameActions,
                                    G_N_ELEMENTS (IdeEditorFrameActions), self);
   gtk_widget_insert_action_group (GTK_WIDGET (self), "frame", G_ACTION_GROUP (group));
+  g_object_unref (group);
 
   group = g_simple_action_group_new ();
   g_action_map_add_action_entries (G_ACTION_MAP (group), IdeEditorFrameSearchActions,
                                    G_N_ELEMENTS (IdeEditorFrameSearchActions), self);
   gtk_widget_insert_action_group (GTK_WIDGET (self->search_entry), "search-entry", G_ACTION_GROUP (group));
+  g_object_unref (group);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]