Re: [PATCH 2.4] lcd: fix memory leak in lcd_ioctl()

2005-01-29 Thread Marcelo Tosatti

Applied both, thanks James.

On Thu, Jan 27, 2005 at 06:25:09PM -0600, James Nelson wrote:
> This patch fixes a memory leak in the FLASH_Burn ioctl for the Cobalt LCD 
> interface driver.
> 
> Signed-off-by: James Nelson <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.4] lcd: fix memory leak in lcd_ioctl()

2005-01-29 Thread Marcelo Tosatti

Applied both, thanks James.

On Thu, Jan 27, 2005 at 06:25:09PM -0600, James Nelson wrote:
 This patch fixes a memory leak in the FLASH_Burn ioctl for the Cobalt LCD 
 interface driver.
 
 Signed-off-by: James Nelson [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2.4] lcd: fix memory leak in lcd_ioctl()

2005-01-27 Thread James Nelson
This patch fixes a memory leak in the FLASH_Burn ioctl for the Cobalt LCD 
interface driver.

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -purN --exclude='*~' linux-2.4.29-original/drivers/char/lcd.c 
linux-2.4.29/drivers/char/lcd.c
--- linux-2.4.29-original/drivers/char/lcd.c2005-01-27 18:46:42.085690494 
-0500
+++ linux-2.4.29/drivers/char/lcd.c 2005-01-27 18:49:38.011310971 -0500
@@ -434,8 +434,10 @@ static int lcd_ioctl(struct inode *inode
save_flags(flags);
for (i=0; ihttp://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2.4] lcd: fix memory leak in lcd_ioctl()

2005-01-27 Thread James Nelson
This patch fixes a memory leak in the FLASH_Burn ioctl for the Cobalt LCD 
interface driver.

Signed-off-by: James Nelson [EMAIL PROTECTED]

diff -purN --exclude='*~' linux-2.4.29-original/drivers/char/lcd.c 
linux-2.4.29/drivers/char/lcd.c
--- linux-2.4.29-original/drivers/char/lcd.c2005-01-27 18:46:42.085690494 
-0500
+++ linux-2.4.29/drivers/char/lcd.c 2005-01-27 18:49:38.011310971 -0500
@@ -434,8 +434,10 @@ static int lcd_ioctl(struct inode *inode
save_flags(flags);
for (i=0; iFLASH_SIZE; i=i+128) {
 
-   if(copy_from_user(rom, display.RomImage + i, 128))
+   if(copy_from_user(rom, display.RomImage + i, 128)) {
+  kfree(rom);
   return -EFAULT;
+   }
burn_addr = kFlashBase + i;
cli();
for ( index = 0; index  ( 128 ) ; index++ ) 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/