[gnome-todo/feature/unref-fixes: 3/3] todo: Fix some leaky GDateTimes




commit 39f086cf7c538ec0219d4e52ea938e938bb301ae
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Oct 8 19:08:48 2021 +0200

    todo: Fix some leaky GDateTimes
    
    All of these are marked `(transfer full)`, so we should be unreffing
    them later onwards.

 src/plugins/todo-txt/gtd-provider-todo-txt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/todo-txt/gtd-provider-todo-txt.c b/src/plugins/todo-txt/gtd-provider-todo-txt.c
index c3694d21..532b53de 100644
--- a/src/plugins/todo-txt/gtd-provider-todo-txt.c
+++ b/src/plugins/todo-txt/gtd-provider-todo-txt.c
@@ -87,9 +87,9 @@ print_task (GString *output,
             GtdTask *task)
 {
   GtdTaskList *list;
-  GDateTime *dt;
-  GDateTime *completion_dt;
-  GDateTime *creation_dt;
+  g_autoptr (GDateTime) dt = NULL;
+  g_autoptr (GDateTime) completion_dt = NULL;
+  g_autoptr (GDateTime) creation_dt = NULL;
   const gchar *description;
   gint depth;
   gboolean is_complete;


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