提交 c8e2876f 编写于 作者: A Al Viro 提交者: Richard Weinberger

um: finally kill ->init_str leaks

now we can do that...
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 04292b2c
......@@ -509,8 +509,10 @@ int setup_one_line(struct line *lines, int n, char *init,
*error_out = "Failed to allocate memory";
return -ENOMEM;
}
if (line->valid)
if (line->valid) {
tty_unregister_device(driver, n);
kfree(line->init_str);
}
line->init_str = new;
line->valid = 1;
err = parse_chan_pair(new, line, n, opts, error_out);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册