[tracker/miner-fs-refactor: 124/127] libtracker-miner: Initialize TrackerDirectoryFlags to NONE in any case
- From: Carlos Garnacho <carlosg 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: Mon, 5 Dec 2011 13:30:01 +0000 (UTC)
commit 5a5a340af1c886f49b38f375bd9d194bb9473811
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]