[gnome-builder] build-result: don't leak async queue



commit 0a9d7f429f505fee310c66bbc81be2405dfb9145
Author: Christian Hergert <chergert redhat com>
Date:   Sat Oct 15 11:52:20 2016 -0700

    build-result: don't leak async queue
    
    We were leaking the async queue when destroying the build result. This
    cleans that up after we know we have destroyed our source to avoid
    racing with accessing the queue from the main thread.

 libide/buildsystem/ide-build-result.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-result.c b/libide/buildsystem/ide-build-result.c
index 5f88908..ea45ceb 100644
--- a/libide/buildsystem/ide-build-result.c
+++ b/libide/buildsystem/ide-build-result.c
@@ -519,6 +519,8 @@ ide_build_result_finalize (GObject *object)
 
   g_clear_pointer (&priv->log_source, g_source_destroy);
 
+  g_clear_pointer (&priv->log_queue, g_async_queue_unref);
+
   g_mutex_clear (&priv->mutex);
 
   G_OBJECT_CLASS (ide_build_result_parent_class)->finalize (object);


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