lkml.org 
[lkml]   [2001]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] rsrc_mgr.c - null ptr fix for 2.4.4
On Thu, May 24, 2001 at 12:35:17AM -0700, Praveen Srinivasan wrote:
> Hi,
> This fixes an unchecked ptr bug in the resource manager code for the PCMCIA
> driver (rsrc_mgr.c).

I would instead suggest:

--- ../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,12 @@

/* First, what does a floating port look like? */
b = kmalloc(256, GFP_KERNEL);
+
+ if(b == NULL){
+ printk(" kmalloc failed!\n");
+ 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/
\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.057 / U:2.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site