diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-02-27 10:04:49 -0500 |
---|---|---|
committer | Josef Bacik <josef@toxicpanda.com> | 2020-02-27 10:04:49 -0500 |
commit | 161c59d18c69947d6feac7181c5bccb7e5d2dc27 (patch) | |
tree | 1d2ae6b60152e23937c4dd8b44d9a86c8e349458 | |
parent | fe9a530d24d0ee380fd199e97ba0f9e8d25a98c8 (diff) | |
download | btrfs-next-161c59d18c69947d6feac7181c5bccb7e5d2dc27.tar.gz |
btrfs: set root to null in btrfs_search_path_in_tree_user
We could potentially have root uninitialized in some cases, so this will
cause problems with btrfs_put_root.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0bd691055e512a..92cb38c9889a64 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2388,7 +2388,7 @@ static int btrfs_search_path_in_tree_user(struct inode *inode, unsigned long item_len; struct btrfs_inode_ref *iref; struct btrfs_root_ref *rref; - struct btrfs_root *root; + struct btrfs_root *root = NULL; struct btrfs_path *path; struct btrfs_key key, key2; struct extent_buffer *leaf; |