[tracker/miner-fs-refactor: 124/127] libtracker-miner: Initialize TrackerDirectoryFlags to NONE in any case
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 124/127] libtracker-miner: Initialize TrackerDirectoryFlags to NONE in any case
- Date: Wed, 7 Dec 2011 10:47:22 +0000 (UTC)
commit f72cb38d020eea2c2321df2fa5be25180377a9f7
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Dec 5 12:42:18 2011 +0100
libtracker-miner: Initialize TrackerDirectoryFlags to NONE in any case
This is so calling tracker_indexing_tree_get_root() on an unindexed file
doesn't end up with uninitialized memory as flags.
src/libtracker-miner/tracker-indexing-tree.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index 2d7170c..d6b26ef 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -780,6 +780,10 @@ tracker_indexing_tree_get_root (TrackerIndexingTree *tree,
NodeData *data;
GNode *parent;
+ if (directory_flags) {
+ *directory_flags = TRACKER_DIRECTORY_FLAG_NONE;
+ }
+
g_return_val_if_fail (TRACKER_IS_INDEXING_TREE (tree), NULL);
g_return_val_if_fail (G_IS_FILE (file), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]