public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@linuxhacker.ru>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [2.5] memleak in drivers/scsi/cpqfcTSinit.c::cpqfcTS_ioctl
Date: Thu, 13 Mar 2003 21:54:11 +0300	[thread overview]
Message-ID: <20030313185411.GA2436@linuxhacker.ru> (raw)

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);

                 reply	other threads:[~2003-03-13 18:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030313185411.GA2436@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox