public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Justin T. Gibbs" <gibbs@btc.adaptec.com>
To: Linux Scsi Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] 2.4.21-pre3 scsi_scan.c memory leak.
Date: Fri, 17 Jan 2003 11:58:47 -0700	[thread overview]
Message-ID: <1216290000.1042829927@aslan.btc.adaptec.com> (raw)

I found this while doing a longevity load/unload test of the aic79xx
driver.  I can't say if this is the only memory leak in the unload
process, but its at least one of them.  This only cleans up properly
in the common cases of failure in scan_scsis_single().  The whole
routines a bit of a mess....

--
Justin


--- scsi_scan.c	2003-01-17 11:53:07.000000000 -0700
+++ scsi_scan.c.mine	2003-01-17 11:53:03.000000000 -0700
@@ -596,6 +596,7 @@
 		} else {
 			/* assume no peripheral if any other sort of error */
 			scsi_release_request(SRpnt);
+			scsi_release_commandblocks(SDpnt);
 			return 0;
 		}
 	}
@@ -619,6 +620,7 @@
 	 */
 	if ((scsi_result[0] >> 5) == 3) {
 		scsi_release_request(SRpnt);
+		scsi_release_commandblocks(SDpnt);
 		return 0;	/* assume no peripheral if any sort of error */
 	}
 	 /*   The Toshiba ROM was "gender-changed" here as an inline hack.


                 reply	other threads:[~2003-01-17 18:58 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=1216290000.1042829927@aslan.btc.adaptec.com \
    --to=gibbs@btc.adaptec.com \
    --cc=linux-scsi@vger.kernel.org \
    /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