mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix memory leak in sd_mod.o
@ 2005-10-30 17:03 Dan Aloni
  0 siblings, 0 replies; only message in thread
From: Dan Aloni @ 2005-10-30 17:03 UTC (permalink / raw)
  To: Linux Kernel List; +Cc: Marcelo Tosatti

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-30 17:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-30 17:03 [PATCH] fix memory leak in sd_mod.o Dan Aloni

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®