diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2014-03-10 23:53:14 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2014-03-10 23:54:02 +0100 |
commit | f0fc3f844ba15fff789a3b4b9fa604a78626d8a8 (patch) | |
tree | eeab9a27f02cb28a9d2492acaa2b98677734ecad /src/miners/fs/tracker-miner-files.c | |
parent | ec0f8af74017cd77499db550006962ac790cf650 (diff) | |
download | tracker-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.c | 14 |
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 |