From 950aef3c79c2310365d1f5ad31a461e5ce005625 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sun, 12 May 2019 18:39:28 -0700 Subject: [PATCH] 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 b5af990b..b6ce7cc1 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);