[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190923225713.13381-1-navid.emamdoost@gmail.com>
Date: Mon, 23 Sep 2019 17:57:10 -0500
From: Navid Emamdoost <navid.emamdoost@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: emamd001@....edu, smccaman@....edu, kjlu@....edu,
Navid Emamdoost <navid.emamdoost@...il.com>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] btrfs: prevent memory leak in super.c
In btrfs_mount_root the last error checking was not going to the error
handling path. Fixed it.
Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
---
fs/btrfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 1b151af25772..9f3f62c000fa 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1565,7 +1565,7 @@ static struct dentry *btrfs_mount_root(struct file_system_type *fs_type,
security_free_mnt_opts(&new_sec_opts);
if (error) {
deactivate_locked_super(s);
- return ERR_PTR(error);
+ goto error_close_devices;
}
return dget(s->s_root);
--
2.17.1
Powered by blists - more mailing lists