* [2.5] memleak in drivers/scsi/cpqfcTSinit.c::cpqfcTS_ioctl
@ 2003-03-13 18:54 Oleg Drokin
0 siblings, 0 replies; only message in thread
From: Oleg Drokin @ 2003-03-13 18:54 UTC (permalink / raw)
To: torvalds, linux-kernel
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 =====
--- 1.32/drivers/scsi/cpqfcTSinit.c Tue Feb 25 21:47:18 2003
+++ edited/drivers/scsi/cpqfcTSinit.c Thu Mar 13 21:50:33 2003
@@ -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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-13 18:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-13 18:54 [2.5] memleak in drivers/scsi/cpqfcTSinit.c::cpqfcTS_ioctl Oleg Drokin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox