Skip to contentSkip to conversation

: repost 2.4.19/drivers/atm/iphase.c

PATCH In review [email protected] 3 participants 3 messages Aug 24, 2002 ATM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : repost 2.4.19/drivers/atm/iphase.c

i must be on drugs.. forgot to attach patch! (of like 1 line!)

--
Silvio

drivers/atm/iphase.c +2 -0
@@ -1990,6 +1990,7 @@
             printk(KERN_ERR DEV_LABEL " couldn't get mem\n");
             return -EAGAIN;
         }
+/* XXX: memory leak on failure */
        	for (i= 0; i< iadev->num_tx_desc; i++)
        	{
  
@@ -2002,6 +2003,7 @@
         }
         iadev->desc_tbl = kmalloc(iadev->num_tx_desc *
                                    sizeof(struct desc_tbl_t), GFP_KERNEL);
+	if (iadev->desc_tbl == NULL) return -EAGAIN;
   
 	/* Communication Queues base address */  
         i = TX_COMP_Q * iadev->memSize;