lkml.org 
[lkml]   [2012]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] tty: handle NULL parameters in free_tty_struct()
On Fri, 20 Jul 2012 10:06:34 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> We sometimes pass NULL pointers to free_tty_struct(). One example where
> it can happen is in the error handling code in pty_common_install().
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Alan Cox <alan@linux.intel.com>

We probably shouldn't be passing NULLs there but making
free_tty_struct(NULL) a no-op matches the kfree and other behaviours and
is robust.


\
 
 \ /
  Last update: 2012-07-20 12:22    [W:0.056 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site