[tracker/rss-enclosures] tracker-extract, gif: Plug small memleak



commit 78560af2444a3c24c1b3fe11e9c01fb1a999fdb2
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Oct 25 18:33:48 2010 +0200

    tracker-extract, gif: Plug small memleak

 src/tracker-extract/tracker-extract-gif.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gif.c b/src/tracker-extract/tracker-extract-gif.c
index d1eb1a8..082ba6b 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -39,10 +39,9 @@ typedef struct {
 } MergeData;
 
 typedef struct {
-	const gchar *width;
-	const gchar *height;
-	const gchar *comment;
-
+	gchar *width;
+	gchar *height;
+	gchar *comment;
 } GifData;
 
 static void extract_gif (const gchar          *filename,
@@ -457,11 +456,13 @@ read_metadata (TrackerSparqlBuilder *preupdate,
 	if (gd.width) {
 		tracker_sparql_builder_predicate (metadata, "nfo:width");
 		tracker_sparql_builder_object_unvalidated (metadata, gd.width);
+		g_free (gd.width);
 	}
 
 	if (gd.height) {
 		tracker_sparql_builder_predicate (metadata, "nfo:height");
 		tracker_sparql_builder_object_unvalidated (metadata, gd.height);
+		g_free (gd.height);
 	}
 
 	tracker_xmp_free (xd);



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