[PATCH] riocmd.c

Praveen Srinivasan (praveens@stanford.edu)
Mon, 11 Jun 2001 23:07:25 -0700


Hi,

This patch fixes an instance where a pointer is not checked after allocation.

Praveen Srinivasan

--- ../linux-fresh/./drivers/char/rio/riocmd.c Fri Feb 9 11:30:23 2001
+++ ./drivers/char/rio/riocmd.c Wed May 23 12:31:01 2001
@@ -623,6 +623,9 @@
struct CmdBlk *CmdBlkP;

CmdBlkP = (struct CmdBlk *)sysbrk(sizeof(struct CmdBlk));
+ if(CmdBlkP == NULL){
+ return NULL;
+ }
bzero(CmdBlkP, sizeof(struct CmdBlk));

return CmdBlkP;
-
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/