提交 72928f24 编写于 作者: V Vincent Stehlé 提交者: David Sterba

Btrfs: fix fspath error deallocation

Make sure to deallocate fspath with vfree() in case of error in
init_ipath().

fspath is allocated with vmalloc() in init_data_container() since
commit 425d17a2 ("Btrfs: use larger limit for translation of logical to
inode").
Signed-off-by: NVincent Stehlé <vincent.stehle@intel.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 52356716
......@@ -1991,7 +1991,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root,
ifp = kmalloc(sizeof(*ifp), GFP_NOFS);
if (!ifp) {
kfree(fspath);
vfree(fspath);
return ERR_PTR(-ENOMEM);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册