aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 05:43:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:44 -0400
commit335adde689150d2fcf4df3cb26a6fc6740ed1f3e (patch)
tree93e11b89e96e8baf15a276e4008e08bb5873fb90 /drivers
parentfe9cd962a62cb5f666cf48b9941d3f3cde134254 (diff)
pty: Fix allocation failure double free
The updating and moving around of the pty code added a bug where both the helper and caller free the main tty struct (the pty driver must free the o_tty pair itself however). Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/pty.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index c3ab8c3110c9..3c6b7911665f 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -544,8 +544,6 @@ free_mem_out:
544 module_put(o_tty->driver->owner); 544 module_put(o_tty->driver->owner);
545 free_tty_struct(o_tty); 545 free_tty_struct(o_tty);
546 pty_unix98_shutdown(tty); 546 pty_unix98_shutdown(tty);
547 free_tty_struct(tty);
548 module_put(driver->owner);
549 return -ENOMEM; 547 return -ENOMEM;
550} 548}
551 549