lkml.org 
[lkml]   [2008]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 67/80] pty: Fix allocation failure double free
Date
From: Alan Cox <alan@redhat.com>

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>
---

drivers/char/pty.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)


diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index c3ab8c3..3c6b791 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -544,8 +544,6 @@ free_mem_out:
module_put(o_tty->driver->owner);
free_tty_struct(o_tty);
pty_unix98_shutdown(tty);
- free_tty_struct(tty);
- module_put(driver->owner);
return -ENOMEM;
}



\
 
 \ /
  Last update: 2008-10-13 12:03    [W:0.227 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site