[tracker-miners/wip/carlosg/leak-fixes: 4/4] tracker-miner-fs: Plug multiple leaks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/leak-fixes: 4/4] tracker-miner-fs: Plug multiple leaks
- Date: Sat, 6 Jun 2020 13:34:46 +0000 (UTC)
commit c62fc8567e759af08a27a8f7d9772222563dba67
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 3 12:16:54 2020 +0200
tracker-miner-fs: Plug multiple leaks
Straightforward ones spotted via valgrind.
src/miners/fs/tracker-main.c | 2 ++
src/miners/fs/tracker-miner-files.c | 2 ++
src/miners/fs/tracker-storage.c | 2 ++
3 files changed, 6 insertions(+)
---
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index 8199e094c..54ec0e1d2 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -176,6 +176,7 @@ save_current_locale (TrackerDomainOntology *domain_ontology)
g_clear_error (&error);
}
+ g_object_unref (cache);
g_free (locale);
g_free (locale_file);
}
@@ -194,6 +195,7 @@ detect_locale_changed (TrackerMiner *miner,
cache = get_cache_dir (domain_ontology);
cache_path = g_file_get_path (cache);
locale_file = g_build_filename (cache_path, LOCALE_FILENAME, NULL);
+ g_object_unref (cache);
g_free (cache_path);
if (G_LIKELY (g_file_test (locale_file, G_FILE_TEST_EXISTS))) {
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 594a5588a..8a383205c 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -773,6 +773,8 @@ miner_files_finalize (GObject *object)
disk_space_check_stop (TRACKER_MINER_FILES (object));
+ g_slist_free_full (mf->private->application_dirs, g_object_unref);
+
if (priv->index_recursive_directories) {
g_slist_foreach (priv->index_recursive_directories, (GFunc) g_free, NULL);
g_slist_free (priv->index_recursive_directories);
diff --git a/src/miners/fs/tracker-storage.c b/src/miners/fs/tracker-storage.c
index 82867f0d8..348c3284d 100644
--- a/src/miners/fs/tracker-storage.c
+++ b/src/miners/fs/tracker-storage.c
@@ -551,6 +551,8 @@ mount_add (TrackerStorage *storage,
g_debug ("Ignoring mount '%s', URI '%s' is not native",
mount_name, uri);
+ g_object_unref (root);
+ g_free (mount_name);
g_free (uri);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]