[gnome-photos/gnome-3-24] local-item: Don't leak the GVariantBuilder



commit ef7ead08e09fb88a17ec8f0c1e263c20f17b5f96
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Dec 3 14:56:10 2017 +0100

    local-item: Don't leak the GVariantBuilder

 src/photos-local-item.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
index 532ed86..970d38f 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -273,7 +273,10 @@ photos_local_item_metadata_add_shared (PhotosBaseItem  *item,
 
       old_shared_variant = g_variant_parse (array_type, shared_string, NULL, NULL, error);
       if (old_shared_variant == NULL)
-        goto out;
+        {
+          g_variant_builder_clear (&builder);
+          goto out;
+        }
 
       g_variant_iter_init (&iter, old_shared_variant);
       child = g_variant_iter_next_value (&iter);


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