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

Praveen Srinivasan (praveens@stanford.edu)
Thu, 24 May 2001 00:35:17 -0700


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/