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.c 2005-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; i<FLASH_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/