[tracker] tracker-extract: Don't leak where clause in image extractions
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Don't leak where clause in image extractions
- Date: Wed, 7 Sep 2011 09:41:57 +0000 (UTC)
commit 01154b789203ac0363350adb6e119175243eb086
Author: Martyn Russell <martyn lanedo com>
Date: Wed Sep 7 10:41:26 2011 +0100
tracker-extract: Don't leak where clause in image extractions
This was leaking for gif, jpeg, pdf, png, tiff and xmp
src/tracker-extract/tracker-extract-gif.c | 4 ++--
src/tracker-extract/tracker-extract-jpeg.c | 4 ++--
src/tracker-extract/tracker-extract-pdf.c | 4 ++--
src/tracker-extract/tracker-extract-png.c | 4 ++--
src/tracker-extract/tracker-extract-tiff.c | 4 ++--
src/tracker-extract/tracker-extract-xmp.c | 4 ++--
6 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gif.c b/src/tracker-extract/tracker-extract-gif.c
index 4c31be8..23170cf 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -613,8 +613,8 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
uri = g_file_get_uri (file);
read_metadata (preupdate, metadata, where, gifFile, uri, graph);
- tracker_extract_info_set_where_clause (info,
- g_string_free (where, FALSE));
+ tracker_extract_info_set_where_clause (info, where->str);
+ g_string_free (where, TRUE);
g_free (uri);
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index 45f78dd..6a2f1bd 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -489,8 +489,8 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
g_ptr_array_free (keywords, TRUE);
- tracker_extract_info_set_where_clause (info,
- g_string_free (where, FALSE));
+ tracker_extract_info_set_where_clause (info, where->str);
+ g_string_free (where, TRUE);
if (md.make || md.model) {
gchar *equip_uri;
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index e9a51a9..b7af260 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -657,8 +657,8 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
g_ptr_array_free (keywords, TRUE);
- tracker_extract_info_set_where_clause (info,
- g_string_free (where, FALSE));
+ tracker_extract_info_set_where_clause (info, where->str);
+ g_string_free (where, TRUE);
tracker_sparql_builder_predicate (metadata, "nfo:pageCount");
tracker_sparql_builder_object_int64 (metadata, poppler_document_get_n_pages (document));
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index c5395a7..a001071 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -743,8 +743,8 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
where = g_string_new ("");
read_metadata (preupdate, metadata, where, png_ptr, info_ptr, end_ptr, uri, graph);
- tracker_extract_info_set_where_clause (info,
- g_string_free (where, FALSE));
+ tracker_extract_info_set_where_clause (info, where->str);
+ g_string_free (where, TRUE);
g_free (uri);
tracker_sparql_builder_predicate (metadata, "nfo:width");
diff --git a/src/tracker-extract/tracker-extract-tiff.c b/src/tracker-extract/tracker-extract-tiff.c
index 603e239..72878a6 100644
--- a/src/tracker-extract/tracker-extract-tiff.c
+++ b/src/tracker-extract/tracker-extract-tiff.c
@@ -643,8 +643,8 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
g_ptr_array_free (keywords, TRUE);
- tracker_extract_info_set_where_clause (info,
- g_string_free (where, FALSE));
+ tracker_extract_info_set_where_clause (info, where->str);
+ g_string_free (where, TRUE);
if (md.make || md.model) {
gchar *equip_uri;
diff --git a/src/tracker-extract/tracker-extract-xmp.c b/src/tracker-extract/tracker-extract-xmp.c
index 13a2954..17b5dbf 100644
--- a/src/tracker-extract/tracker-extract-xmp.c
+++ b/src/tracker-extract/tracker-extract-xmp.c
@@ -156,8 +156,8 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
where = g_string_new ("");
tracker_xmp_apply (preupdate, metadata, graph, where, uri, xd);
- tracker_extract_info_set_where_clause (info,
- g_string_free (where, FALSE));
+ tracker_extract_info_set_where_clause (info, where->str);
+ g_string_free (where, TRUE);
}
g_free (original_uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]