[gnome-builder] meson: don't leak build targets in project tree



commit 9cbfa6fbe3f806e9c889145607c2280e3ffcf0b7
Author: Christian Hergert <chergert redhat com>
Date:   Tue Feb 19 13:22:53 2019 -0800

    meson: don't leak build targets in project tree

 src/plugins/buildui/gbp-buildui-tree-addin.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/buildui/gbp-buildui-tree-addin.c b/src/plugins/buildui/gbp-buildui-tree-addin.c
index f05c5e20f..579d80729 100644
--- a/src/plugins/buildui/gbp-buildui-tree-addin.c
+++ b/src/plugins/buildui/gbp-buildui-tree-addin.c
@@ -72,7 +72,10 @@ get_targets_cb (GObject      *object,
 
   state = ide_task_get_task_data (task);
 
-  if ((targets = ide_build_target_provider_get_targets_finish (provider, result, &error)))
+  targets = ide_build_target_provider_get_targets_finish (provider, result, &error);
+  IDE_PTR_ARRAY_SET_FREE_FUNC (targets, g_object_unref);
+
+  if (targets)
     {
       for (guint i = 0; i < targets->len; i++)
         {


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