diff options
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 5e1e8ec0589e..7d4547e5202d 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -2267,8 +2267,10 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, } } else { err = ubifs_fill_super(sb, data, flags & SB_SILENT ? 1 : 0); - if (err) + if (err) { + kfree(c); goto out_deact; + } /* We do not support atime */ sb->s_flags |= SB_ACTIVE; if (IS_ENABLED(CONFIG_UBIFS_ATIME_SUPPORT)) |