mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-14 09:09:56 +00:00
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 425d17a290c0 ("Btrfs: use larger limit for translation of logical to inode"). Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
523567168d
commit
72928f2476
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user