spi: potential memleak in spidev_ioctl
[sfrench/cifs-2.6.git] / drivers / spi / spidev.c
index bcfef04f547e122084767751e4ced229e9f8c018..d04242aee40dd613eaa903c99fe9349a8bf418f8 100644 (file)
@@ -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;
                }