[PATCH] riocmd.c

From: Praveen Srinivasan (praveens@stanford.edu)
Date: Tue Jun 12 2001 - 01:07:25 EST


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/



This archive was generated by hypermail 2b29 : Fri Jun 15 2001 - 21:00:14 EST