[gnome-notes/gnome-3-36] own-cloud-provider: Fix a memory leak



commit faf085b0932e3b1dfa842fbd0d1aa5fed57ff27a
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue Apr 7 09:53:06 2020 +0530

    own-cloud-provider: Fix a memory leak

 src/libbiji/provider/biji-own-cloud-provider.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libbiji/provider/biji-own-cloud-provider.c b/src/libbiji/provider/biji-own-cloud-provider.c
index 2ae8b2a..8f22917 100644
--- a/src/libbiji/provider/biji-own-cloud-provider.c
+++ b/src/libbiji/provider/biji-own-cloud-provider.c
@@ -366,13 +366,13 @@ enumerate_next_files_ready_cb (GObject *source,
   {
     GFileInfo *info;
     BijiOCloudItem *item;
+    g_autofree char *file_name = NULL;
 
     info = l->data;
     item = o_cloud_item_new (self);
     item->set.title = g_strdup (g_file_info_get_name (info));
-    item->set.url = g_build_filename
-      (g_file_get_parse_name (self->folder),
-       "/", item->set.title, NULL);
+    file_name = g_file_get_parse_name (self->folder);
+    item->set.url = g_build_filename (file_name, "/", item->set.title, NULL);
 
     item->set.mtime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
     item->set.created = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_CREATED);


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