[tracker/uuid-geo-stuff] tracker-extract, libtracker-extract: Free addruri everywhere



commit 0bd15e1f2e0aa10360682ff5f088d1a767d90f3c
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Nov 24 15:53:04 2010 +0100

    tracker-extract, libtracker-extract: Free addruri everywhere

 src/libtracker-extract/tracker-xmp.c        |    3 ++-
 src/tracker-extract/tracker-extract-gif.c   |    2 ++
 src/tracker-extract/tracker-extract-jpeg.c  |    2 ++
 src/tracker-extract/tracker-extract-pdf.cpp |    2 ++
 src/tracker-extract/tracker-extract-png.c   |    2 ++
 src/tracker-extract/tracker-extract-tiff.c  |    2 ++
 6 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index 1437eb4..ab01aab 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -903,7 +903,6 @@ tracker_xmp_apply (TrackerSparqlBuilder *preupdate,
 		addruri = tracker_sparql_get_uuid_urn ();
 
 		tracker_sparql_builder_predicate (metadata, "mlo:asPostalAddress");
-
 		tracker_sparql_builder_object_iri (metadata, addruri);
 
 		tracker_sparql_builder_object_blank_close (metadata); /* GeoPoint */
@@ -911,6 +910,8 @@ tracker_xmp_apply (TrackerSparqlBuilder *preupdate,
 		tracker_sparql_builder_insert_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, addruri);
 
+		g_free (addruri);
+
 		tracker_sparql_builder_predicate (preupdate, "a");
 		tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
 
diff --git a/src/tracker-extract/tracker-extract-gif.c b/src/tracker-extract/tracker-extract-gif.c
index 87583ee..4346fa7 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -457,6 +457,8 @@ read_metadata (TrackerSparqlBuilder *preupdate,
 		tracker_sparql_builder_insert_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, addruri);
 
+		g_free (addruri);
+
 		tracker_sparql_builder_predicate (preupdate, "a");
 		tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
 
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index f0e34ac..3c7ff44 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -574,6 +574,8 @@ extract_jpeg (const gchar          *uri,
 		tracker_sparql_builder_insert_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, addruri);
 
+		g_free (addruri);
+
 		tracker_sparql_builder_predicate (preupdate, "a");
 		tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
 
diff --git a/src/tracker-extract/tracker-extract-pdf.cpp b/src/tracker-extract/tracker-extract-pdf.cpp
index 91ae5dd..c1febd3 100644
--- a/src/tracker-extract/tracker-extract-pdf.cpp
+++ b/src/tracker-extract/tracker-extract-pdf.cpp
@@ -778,6 +778,8 @@ extract_pdf (const gchar          *uri,
 				tracker_sparql_builder_insert_open (preupdate, NULL);
 				tracker_sparql_builder_subject_iri (preupdate, addruri);
 
+				g_free (addruri);
+
 				tracker_sparql_builder_predicate (preupdate, "a");
 				tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
 
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index c867a5f..1a12582 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -450,6 +450,8 @@ read_metadata (TrackerSparqlBuilder *preupdate,
 		tracker_sparql_builder_insert_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, addruri);
 
+		g_free (addruri);
+
 		tracker_sparql_builder_predicate (preupdate, "a");
 		tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
 
diff --git a/src/tracker-extract/tracker-extract-tiff.c b/src/tracker-extract/tracker-extract-tiff.c
index 5e72369..110e70f 100644
--- a/src/tracker-extract/tracker-extract-tiff.c
+++ b/src/tracker-extract/tracker-extract-tiff.c
@@ -507,6 +507,8 @@ extract_tiff (const gchar          *uri,
 		tracker_sparql_builder_insert_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, addruri);
 
+		g_free (addruri);
+
 		tracker_sparql_builder_predicate (preupdate, "a");
 		tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
 



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