From: Dan Aloni <da-x@monatomic.org>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: [PATCH] fix memory leak in sd_mod.o
Date: Sun, 30 Oct 2005 19:03:57 +0200 [thread overview]
Message-ID: <20051030170357.GA21497@localdomain> (raw)
Handle freeing of sd_max_sectors in sd_exit().
Signed-off-by: Dan Aloni <da-x@monatomic.org>
---
commit 94e91dcc1b0903a45642fcb906d8a26c996db277
tree b1d1b44ab4738268f839c83e5e56832124d4b2f3
parent 2afb6d8ea04e81a1547e8e51b7550a8fd69b9fce
author Dan Aloni <da-x@monatomic.org> Sun, 30 Oct 2005 18:56:35 +0200
committer Dan Aloni <da-x@monatomic.org> Sun, 30 Oct 2005 18:56:35 +0200
drivers/scsi/sd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1472,6 +1472,7 @@ static void __exit exit_sd(void)
kfree(sd_sizes);
kfree(sd_blocksizes);
kfree(sd_hardsizes);
+ kfree(sd_max_sectors);
for (i = 0; i < N_USED_SD_MAJORS; i++) {
kfree(sd_gendisks[i].de_arr);
kfree(sd_gendisks[i].flags);
@@ -1482,6 +1483,7 @@ static void __exit exit_sd(void)
del_gendisk(&sd_gendisks[i]);
blksize_size[SD_MAJOR(i)] = NULL;
hardsect_size[SD_MAJOR(i)] = NULL;
+ max_sectors[SD_MAJOR(i)] = NULL;
read_ahead[SD_MAJOR(i)] = 0;
}
sd_template.dev_max = 0;
--
Dan Aloni
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net
reply other threads:[~2005-10-30 17:04 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=20051030170357.GA21497@localdomain \
--to=da-x@monatomic.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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
all inboxes | Powered by JetHome®