Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248653
b: refs/heads/master
c: c18d77a
h: refs/heads/master
i:
  248651: 22951a7
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 19, 2011
1 parent c603c5e commit 4d1567c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a1b8d70a07628f294f30485acf81971e3fcc755
refs/heads/master: c18d77aa00cde1215d9e045ba8f93004fe843f38
12 changes: 6 additions & 6 deletions trunk/drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,20 +560,19 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
return -ENOMEM;
if (!try_module_get(driver->other->owner)) {
/* This cannot in fact currently happen */
free_tty_struct(o_tty);
return -ENOMEM;
goto err_free_tty;
}
initialize_tty_struct(o_tty, driver->other, idx);

tty->termios = kzalloc(sizeof(struct ktermios[2]), GFP_KERNEL);
if (tty->termios == NULL)
goto free_mem_out;
goto err_free_mem;
*tty->termios = driver->init_termios;
tty->termios_locked = tty->termios + 1;

o_tty->termios = kzalloc(sizeof(struct ktermios[2]), GFP_KERNEL);
if (o_tty->termios == NULL)
goto free_mem_out;
goto err_free_mem;
*o_tty->termios = driver->other->init_termios;
o_tty->termios_locked = o_tty->termios + 1;

Expand All @@ -592,11 +591,12 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
tty->count++;
pty_count++;
return 0;
free_mem_out:
err_free_mem:
kfree(o_tty->termios);
kfree(tty->termios);
module_put(o_tty->driver->owner);
err_free_tty:
free_tty_struct(o_tty);
kfree(tty->termios);
return -ENOMEM;
}

Expand Down

0 comments on commit 4d1567c

Please sign in to comment.