[sysprof] libsysprof-ui: fix transfer ownership



commit 950aef3c79c2310365d1f5ad31a461e5ce005625
Author: Christian Hergert <chergert redhat com>
Date:   Sun May 12 18:39:28 2019 -0700

    libsysprof-ui: fix transfer ownership

 src/libsysprof-ui/sysprof-marks-model.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-marks-model.c b/src/libsysprof-ui/sysprof-marks-model.c
index b5af990..b6ce7cc 100644
--- a/src/libsysprof-ui/sysprof-marks-model.c
+++ b/src/libsysprof-ui/sysprof-marks-model.c
@@ -102,9 +102,9 @@ sysprof_marks_model_new_worker (GTask        *task,
 {
   const SysprofCaptureFrameType types[] = { SYSPROF_CAPTURE_FRAME_MARK };
   SysprofCaptureReader *reader = task_data;
-  g_autoptr(SysprofCaptureCondition) condition = NULL;
   g_autoptr(SysprofCaptureCursor) cursor = NULL;
   g_autoptr(SysprofMarksModel) self = NULL;
+  SysprofCaptureCondition *condition;
 
   g_assert (G_IS_TASK (task));
   g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
@@ -113,7 +113,7 @@ sysprof_marks_model_new_worker (GTask        *task,
 
   cursor = sysprof_capture_cursor_new (reader);
   condition = sysprof_capture_condition_new_where_type_in (G_N_ELEMENTS (types), types);
-  sysprof_capture_cursor_add_condition (cursor, condition);
+  sysprof_capture_cursor_add_condition (cursor, g_steal_pointer (&condition));
   sysprof_capture_cursor_foreach (cursor, cursor_foreach_cb, self);
 
   g_task_return_pointer (task, g_steal_pointer (&self), g_object_unref);


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