[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 41/116] libtracker-miner: Fix possible leak
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 41/116] libtracker-miner: Fix possible leak
- Date: Thu, 12 Dec 2019 10:19:33 +0000 (UTC)
commit 3db540c622b5f8970bb9b170398aefb4a08b1468
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 25 20:10:23 2017 +0200
libtracker-miner: Fix possible leak
If we hit some early return conditions, the RootData would be
leaked.
src/libtracker-miner/tracker-file-notifier.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 8555f8af5..e88117a79 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -1019,7 +1019,7 @@ notifier_queue_file (TrackerFileNotifier *notifier,
TrackerDirectoryFlags flags)
{
TrackerFileNotifierPrivate *priv = notifier->priv;
- RootData *data = root_data_new (notifier, file, flags);
+ RootData *data;
if (priv->current_index_root &&
priv->current_index_root->root == file)
@@ -1029,6 +1029,8 @@ notifier_queue_file (TrackerFileNotifier *notifier,
(GCompareFunc) find_directory_root))
return;
+ data = root_data_new (notifier, file, flags);
+
if (flags & TRACKER_DIRECTORY_FLAG_PRIORITY) {
priv->pending_index_roots = g_list_prepend (priv->pending_index_roots, data);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]