diff options
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 47c96fdca1a..6893717b653 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -829,15 +829,20 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
829 | if (!file) | 829 | if (!file) |
830 | return -EINVAL; | 830 | return -EINVAL; |
831 | 831 | ||
832 | if (file->f_op != &fuse_dev_operations) | 832 | if (file->f_op != &fuse_dev_operations) { |
833 | fput(file); | ||
833 | return -EINVAL; | 834 | return -EINVAL; |
835 | } | ||
834 | 836 | ||
835 | fc = kmalloc(sizeof(*fc), GFP_KERNEL); | 837 | fc = kmalloc(sizeof(*fc), GFP_KERNEL); |
836 | if (!fc) | 838 | if (!fc) { |
839 | fput(file); | ||
837 | return -ENOMEM; | 840 | return -ENOMEM; |
841 | } | ||
838 | 842 | ||
839 | err = fuse_conn_init(fc, sb); | 843 | err = fuse_conn_init(fc, sb); |
840 | if (err) { | 844 | if (err) { |
845 | fput(file); | ||
841 | kfree(fc); | 846 | kfree(fc); |
842 | return err; | 847 | return err; |
843 | } | 848 | } |