[gthumb/ext] unref the metadata after use



commit 886dbff6ca70eac7b91af5bcd38598eaa27a3261
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Dec 16 21:04:33 2009 +0100

    unref the metadata after use

 .../comments/gth-metadata-provider-comment.c       |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/extensions/comments/gth-metadata-provider-comment.c b/extensions/comments/gth-metadata-provider-comment.c
index d592308..aa0ca96 100644
--- a/extensions/comments/gth-metadata-provider-comment.c
+++ b/extensions/comments/gth-metadata-provider-comment.c
@@ -43,17 +43,19 @@ static gpointer parent_class = NULL;
 static void
 set_attribute_from_string (GFileInfo  *info,
 			   const char *key,
-			   const char *value,
+			   const char *raw,
 			   const char *formatted)
 {
 	GthMetadata *metadata;
 
 	metadata = g_object_new (GTH_TYPE_METADATA,
 				 "id", key,
-				 "raw", value,
-				 "formatted", (formatted != NULL ? formatted : value),
+				 "raw", raw,
+				 "formatted", (formatted != NULL ? formatted : raw),
 				 NULL);
 	g_file_info_set_attribute_object (info, key, G_OBJECT (metadata));
+
+	g_object_unref (metadata);
 }
 
 



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