sx memleak.
davej@codemonkey.org.uk
Thu, 15 May 2003 04:31:03 +0100
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/char/sx.c linux-2.5/drivers/char/sx.c
--- bk-linus/drivers/char/sx.c 2003-05-14 01:32:18.000000000 +0100
+++ linux-2.5/drivers/char/sx.c 2003-04-26 15:08:04.000000000 +0100
@@ -1739,8 +1739,10 @@ static int sx_fw_ioctl (struct inode *in
if (copy_from_user(tmp, (char *)data + i,
(i + SX_CHUNK_SIZE >
nbytes) ? nbytes - i :
- SX_CHUNK_SIZE))
+ SX_CHUNK_SIZE)) {
+ kfree (tmp);
return -EFAULT;
+ }
memcpy_toio ((char *) (board->base2 + offset + i), tmp,
(i+SX_CHUNK_SIZE>nbytes)?nbytes-i:SX_CHUNK_SIZE);
}
-
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/