Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff78fca2 authored by Al Viro's avatar Al Viro
Browse files

fix leak in proc_set_super()



set_anon_super() can fail...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b99ca60c
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -28,11 +28,12 @@ static int proc_test_super(struct super_block *sb, void *data)

static int proc_set_super(struct super_block *sb, void *data)
{
	struct pid_namespace *ns;

	ns = (struct pid_namespace *)data;
	int err = set_anon_super(sb, NULL);
	if (!err) {
		struct pid_namespace *ns = (struct pid_namespace *)data;
		sb->s_fs_info = get_pid_ns(ns);
	return set_anon_super(sb, NULL);
	}
	return err;
}

static struct dentry *proc_mount(struct file_system_type *fs_type,