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



commit cb212775d679844fb09dcd207d73daa2d3b28abb
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 b63f009..a3cc3f3 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -274,7 +274,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]