[tracker] Make tracker_module_file_get_metadata() out arg more robust
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] Make tracker_module_file_get_metadata() out arg more robust
- Date: Tue, 14 Jul 2009 20:50:27 +0000 (UTC)
commit 0b2f87e34935d57aa3b12b5ec78636648018b18d
Author: Benjamin Otte <otte gnome org>
Date: Tue Jul 14 22:40:40 2009 +0200
Make tracker_module_file_get_metadata() out arg more robust
- Set the mime_type out argument to NULL in any case.
- Always provide a valid mime_type pointer to called vfuncs.
src/tracker-miner-fs/tracker-module-file.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-module-file.c b/src/tracker-miner-fs/tracker-module-file.c
index 6a97b18..d8f17cd 100644
--- a/src/tracker-miner-fs/tracker-module-file.c
+++ b/src/tracker-miner-fs/tracker-module-file.c
@@ -251,12 +251,18 @@ tracker_module_file_get_text (TrackerModuleFile *file)
TrackerSparqlBuilder *
tracker_module_file_get_metadata (TrackerModuleFile *file, gchar **mime_type)
{
+ gchar *tmp = NULL;
TrackerSparqlBuilder *sparql = NULL;
if (TRACKER_MODULE_FILE_GET_CLASS (file)->get_metadata != NULL) {
- sparql = TRACKER_MODULE_FILE_GET_CLASS (file)->get_metadata (file, mime_type);
+ sparql = TRACKER_MODULE_FILE_GET_CLASS (file)->get_metadata (file, &tmp);
}
+ if (mime_type)
+ *mime_type = tmp;
+ else
+ g_free (tmp);
+
return sparql;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]