summaryrefslogtreecommitdiff
path: root/src/miners/fs/tracker-miner-files.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-03-10 23:53:14 +0100
committerCarlos Garnacho <carlosg@gnome.org>2014-03-10 23:54:02 +0100
commitf0fc3f844ba15fff789a3b4b9fa604a78626d8a8 (patch)
treeeeab9a27f02cb28a9d2492acaa2b98677734ecad /src/miners/fs/tracker-miner-files.c
parentec0f8af74017cd77499db550006962ac790cf650 (diff)
downloadtracker-f0fc3f844ba15fff789a3b4b9fa604a78626d8a8.tar.gz
miner-fs: Plug leak
The rdf types GStrv must be freed after usage.
Diffstat (limited to 'src/miners/fs/tracker-miner-files.c')
-rw-r--r--src/miners/fs/tracker-miner-files.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index dd14536d7..c0904cf17 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -1984,15 +1984,19 @@ miner_files_add_rdf_types (TrackerSparqlBuilder *sparql,
rdf_types = tracker_extract_module_manager_get_fallback_rdf_types (mime_type);
- if (!rdf_types || !rdf_types[0])
+ if (!rdf_types)
return;
- tracker_sparql_builder_predicate (sparql, "a");
+ if (rdf_types[0]) {
+ tracker_sparql_builder_predicate (sparql, "a");
- while (rdf_types[i]) {
- tracker_sparql_builder_object (sparql, rdf_types[i]);
- i++;
+ while (rdf_types[i]) {
+ tracker_sparql_builder_object (sparql, rdf_types[i]);
+ i++;
+ }
}
+
+ g_strfreev (rdf_types);
}
static void