[tracker-miners/wip/carlosg/leak-fixes: 3/4] tracker-miner-fs: Plug TrackerResource leak
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/leak-fixes: 3/4] tracker-miner-fs: Plug TrackerResource leak
- Date: Sat, 6 Jun 2020 13:34:41 +0000 (UTC)
commit 07be22e95d57daff77b0435abdf8903a6f57f27c
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jun 6 15:28:34 2020 +0200
tracker-miner-fs: Plug TrackerResource leak
The file_resource variable was left a dangling reference. After
that, try to avoid the circular reference with the resource variable
by using its blank node label.
src/miners/fs/tracker-miner-files.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 4128b1248..594a5588a 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2221,8 +2221,9 @@ miner_files_create_information_element (const gchar *uri,
tracker_resource_add_uri (file_resource, "rdf:type", "nfo:FileDataObject");
/* Laying the link between the IE and the DO */
- tracker_resource_add_relation (resource, "nie:isStoredAs", file_resource);
- tracker_resource_add_relation (file_resource, "nie:interpretedAs", resource);
+ tracker_resource_add_take_relation (resource, "nie:isStoredAs", file_resource);
+ tracker_resource_add_uri (file_resource, "nie:interpretedAs",
+ tracker_resource_get_identifier (resource));
while (rdf_types[i]) {
tracker_resource_add_uri (resource, "rdf:type", rdf_types[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]