[gnome-calendar] log: Use g_autofree



commit e39bd95c878904c540eb8f8030e1f1bbd98dd056
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Sep 14 10:39:38 2019 -0300

    log: Use g_autofree

 src/core/gcal-log.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/core/gcal-log.c b/src/core/gcal-log.c
index b734e78c..3eb38afa 100644
--- a/src/core/gcal-log.c
+++ b/src/core/gcal-log.c
@@ -57,11 +57,11 @@ gcal_log_handler (const gchar    *domain,
                   gpointer        user_data)
 {
   GTimeVal tv;
+  g_autofree gchar *buffer = NULL;
   struct tm tt;
   time_t t;
   const gchar *level;
   gchar ftime[32];
-  gchar *buffer;
 
   /* Skip ignored log domains */
   if (domain && g_strv_contains (ignored_domains, domain))
@@ -86,8 +86,6 @@ gcal_log_handler (const gchar    *domain,
   g_io_channel_flush (standard_channel, NULL);
 
   G_UNLOCK (channel_lock);
-
-  g_free (buffer);
 }
 
 void


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