aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 368a5b9e6c13..74023786a735 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1677,6 +1677,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1677 flags | SB_RDONLY, device_name, data); 1677 flags | SB_RDONLY, device_name, data);
1678 if (IS_ERR(mnt_root)) { 1678 if (IS_ERR(mnt_root)) {
1679 root = ERR_CAST(mnt_root); 1679 root = ERR_CAST(mnt_root);
1680 kfree(subvol_name);
1680 goto out; 1681 goto out;
1681 } 1682 }
1682 1683
@@ -1686,12 +1687,14 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1686 if (error < 0) { 1687 if (error < 0) {
1687 root = ERR_PTR(error); 1688 root = ERR_PTR(error);
1688 mntput(mnt_root); 1689 mntput(mnt_root);
1690 kfree(subvol_name);
1689 goto out; 1691 goto out;
1690 } 1692 }
1691 } 1693 }
1692 } 1694 }
1693 if (IS_ERR(mnt_root)) { 1695 if (IS_ERR(mnt_root)) {
1694 root = ERR_CAST(mnt_root); 1696 root = ERR_CAST(mnt_root);
1697 kfree(subvol_name);
1695 goto out; 1698 goto out;
1696 } 1699 }
1697 1700