summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/fuse/inode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index c7a410118a1a..755fe24d7ad7 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -825,12 +825,16 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
if (!file)
return -EINVAL;
- if (file->f_op != &fuse_dev_operations)
+ if (file->f_op != &fuse_dev_operations) {
+ fput(file);
return -EINVAL;
+ }
fc = new_conn(sb);
- if (!fc)
+ if (!fc) {
+ fput(file);
return -ENOMEM;
+ }
fc->flags = d.flags;
fc->user_id = d.user_id;