[PATCH] extra memory checking in tty_io.c (2.2.12)

Mooneer Salem (mooneer@earthlink.net)
Wed, 15 Sep 1999 07:01:11 -0700


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/