lkml.org 
[lkml]   [1999]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] extra memory checking in tty_io.c (2.2.12)
Below is a patch for 2.2.12 which adds extra checking in
tty_unregister_driver
to see if a NULL pointer was passed to it and returns normally if it
does.
I'm not sure if this would fix any bugs, but it's worth a shot:

--- tty_io.c Wed Aug 25 19:29:46 1999
+++ tty_io.c.new Tue Sep 14 20:24:15 1999
@@ -1982,6 +1982,10 @@
int found = 0;
const char *othername = NULL;

+ if (!driver) {
+ return 0;
+ }
+
if (*driver->refcount)
return -EBUSY;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.026 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site