mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
um: finally kill ->init_str leaks
now we can do that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
04292b2cf8
commit
c8e2876fc8
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue