lkml.org 
[lkml]   [2001]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] drivers/pcmcia/cs.c

Check kmalloc().

-Thiago Rondon

--- linux-2.4.0-ac5/drivers/pcmcia/cs.c Fri Dec 29 20:35:47 2000
+++ linux-2.4.0-ac5.maluco/drivers/pcmcia/cs.c Wed Jan 10 16:18:11 2001
@@ -1458,6 +1458,8 @@
s->functions = 1;
s->config = kmalloc(sizeof(config_t) * s->functions,
GFP_KERNEL);
+ if (!s->config)
+ return CS_OUT_OF_RESOURCE;
memset(s->config, 0, sizeof(config_t) * s->functions);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.037 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site