[PATCH] rsrc_mgr.c - null ptr fix for 2.4.4

From: Praveen Srinivasan (praveens@stanford.edu)
Date: Thu May 24 2001 - 02:35:17 EST


Hi,
This fixes an unchecked ptr bug in the resource manager code for the PCMCIA
driver (rsrc_mgr.c).

Praveen Srinivasan and Frederick Akalin

--- ../linux/./drivers/pcmcia/rsrc_mgr.c Tue Mar 6 19:28:32 2001
+++ ./drivers/pcmcia/rsrc_mgr.c Mon May 7 22:09:09 2001
@@ -189,6 +189,11 @@
     
     /* First, what does a floating port look like? */
     b = kmalloc(256, GFP_KERNEL);
+
+ if(b == NULL){
+ return;
+ }
+
     memset(b, 0, 256);
     for (i = base, most = 0; i < base+num; i += 8) {
         if (check_io_resource(i, 8))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 31 2001 - 21:00:14 EST