提交 c24e9b3f 编写于 作者: C Cyrill Gorcunov 提交者: Linus Torvalds

capifs: fix memory leak on remount

capifs_remount may reach 'return' statement without freeing of memory
allocated by kstrdup call
Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 30d55e71
......@@ -69,6 +69,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
} else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1)
mode = n & ~S_IFMT;
else {
kfree(new_opt);
printk("capifs: called with bogus options\n");
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册