lkml.org 
[lkml]   [2002]   [Aug]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 24 Aug 2002 03:08:55 -0700
From silvio@qualys ...
Subject[PATCH TRIVIAL]: repost 2.4.19/drivers/atm/iphase.c
i must be on drugs.. forgot to attach patch! (of like 1 line!)

--
Silvio
--- linux-2.4.19/drivers/atm/iphase.c	Mon Feb 25 11:37:57 2002
+++ linux-2.4.19-dev/drivers/atm/iphase.c	Sat Aug 24 02:44:15 2002
@@ -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;
\
 
 \ /
  Last update: 2005-03-22 12:28    [from the cache]
©2003-2008