Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72928f24 authored by Vincent Stehlé's avatar Vincent Stehlé Committed by David Sterba
Browse files

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: default avatarVincent Stehlé <vincent.stehle@intel.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 52356716
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}