Message ID | 20210604161156.408496-2-groug@kaod.org |
---|---|
State | Accepted |
Commit | d92d88f0568e97c437eeb79d9c9609bd8277406f |
Headers | show |
Series | [v2,1/7] fuse: Fix crash in fuse_dentry_automount() error path | expand |
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 1b6c001a7dd1..01559061cbfb 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -339,8 +339,12 @@ static struct vfsmount *fuse_dentry_automount(struct path *path) /* Initialize superblock, making @mp_fi its root */ err = fuse_fill_super_submount(sb, mp_fi); - if (err) + if (err) { + fuse_conn_put(fc); + kfree(fm); + sb->s_fs_info = NULL; goto out_put_sb; + } sb->s_flags |= SB_ACTIVE; fsc->root = dget(sb->s_root);