[gnome-builder] beautifier: fix leak of self in async call



commit 0d97531c9c437ca777f063edff6811a37e6474f2
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jan 7 13:32:00 2018 -0800

    beautifier: fix leak of self in async call

 .../beautifier/gb-beautifier-editor-addin.c        |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/beautifier/gb-beautifier-editor-addin.c 
b/src/plugins/beautifier/gb-beautifier-editor-addin.c
index 4cfa9da..f40fec4 100644
--- a/src/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/src/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -361,6 +361,7 @@ get_entries_async_cb (GObject      *object,
 
   g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
   g_assert (G_IS_ASYNC_RESULT (result));
+  g_assert (user_data == NULL);
 
   if (NULL == (ret = gb_beautifier_config_get_entries_finish (self, result, &error)))
     {
@@ -401,7 +402,7 @@ gb_beautifier_editor_addin_load (IdeEditorAddin       *addin,
                                           &self->has_default,
                                           get_entries_async_cb,
                                           NULL,
-                                          g_object_ref (self));
+                                          NULL);
 }
 
 static void


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