[PATCH 4/6] btrfs-progs: Fix uninitialized key.type for btrfs_find_free_objectid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To avoid using uninitialized value in btrfs_search_slot().

Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
---
 inode-map.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/inode-map.c b/inode-map.c
index 1321bfb..346952b 100644
--- a/inode-map.c
+++ b/inode-map.c
@@ -44,6 +44,7 @@ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
 				BTRFS_FIRST_FREE_OBJECTID);
 	search_key.objectid = search_start;
 	search_key.offset = 0;
+	search_key.type = 0;
 
 	btrfs_init_path(path);
 	start_found = 0;
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux