summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorVincent Stehlé <vincent.stehle@intel.com>2016-05-10 14:56:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-07 18:18:55 -0700
commitb9cd7ba4dd03492246c2a717854803699bcad174 (patch)
tree9fd2fda5211b5aee2d33750c2f9287f9d6eb2d0f /fs
parentf97bce9f0c792712767dcff09e46b0617c1462a4 (diff)
Btrfs: fix fspath error deallocation
commit 72928f2476d08c79f132b4f44a17c9a011dd98e3 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/backref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index f6dac40f87ff..6442a31c2119 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1995,7 +1995,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);
}