aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-09-09 20:08:48 -0400
committerRichard Weinberger <richard@nod.at>2012-03-24 19:29:54 -0400
commitc8e2876fc8adaf9539f051fcda5d551308e8a0f8 (patch)
tree29c8a0cc31d00dcd185003405e92e66790d2d243 /arch/um/drivers
parent04292b2cf8f02a33cfc1054c0c51aa8c77731813 (diff)
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>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/line.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 002d4a968ae6..9ffade87a8cf 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -509,8 +509,10 @@ int setup_one_line(struct line *lines, int n, char *init,
509 *error_out = "Failed to allocate memory"; 509 *error_out = "Failed to allocate memory";
510 return -ENOMEM; 510 return -ENOMEM;
511 } 511 }
512 if (line->valid) 512 if (line->valid) {
513 tty_unregister_device(driver, n); 513 tty_unregister_device(driver, n);
514 kfree(line->init_str);
515 }
514 line->init_str = new; 516 line->init_str = new;
515 line->valid = 1; 517 line->valid = 1;
516 err = parse_chan_pair(new, line, n, opts, error_out); 518 err = parse_chan_pair(new, line, n, opts, error_out);