[2.5] memleak in drivers/scsi/cpqfcTSinit.c::cpqfcTS_ioctl
Hello!
There seem to be a memleak on error exit path if copy_to_user() fails. See the patch below.
Bye,
Oleg
===== drivers/scsi/cpqfcTSinit.c 1.32 vs edited =====
drivers/scsi/cpqfcTSinit.c +1 -1
@@ -686,7 +686,7 @@if ( (vendor_cmd->rw_flag ==VENDOR_READ_OPCODE ) && vendor_cmd->len )if (copy_to_user ( vendor_cmd->bufp, buf, vendor_cmd->len)) -return ( -EFAULT ); + result = -EFAULT ;if ( buf)kfree ( buf);