Messages in this thread Patch in this message | | | Date | Wed, 16 May 2007 19:33:48 -0400 | From | Florin Malita <> | Subject | [PATCH] spi: potential memleak in spidev_ioctl |
| |
'ioc' should be deallocated if __copy_from_user fails (found by Coverity - CID 1644).
Signed-off-by: Florin Malita <fmalita@gmail.com> ---
spidev.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index c0a6dce..2464f34 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -364,6 +364,7 @@ spidev_ioctl(struct inode *inode, struct file *filp, break; } if (__copy_from_user(ioc, (void __user *)arg, tmp)) { + kfree(ioc); retval = -EFAULT; break; } - 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/
| |