Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vandrovec <vandrove@vc.cvut.cz>2002-07-05 02:27:11 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-07-05 02:27:11 -0700
commit3bb19dd45df33ceb842019c939d4445dac1d8220 (patch)
tree7744e27ebc14385c462fe181db6910cf79a32be8
parente1d160224c822b80b649a1239977a5559f2e8418 (diff)
[PATCH] drivers/ide/probe.c leaks memory
drivers/ide/probe.c initializes gd->de_arr and gd->flags twice. Except that it is unnecessary it also leaks memory.
-rw-r--r--drivers/ide/probe.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/ide/probe.c b/drivers/ide/probe.c
index b1b026f76cfc..ab7df11e44a7 100644
--- a/drivers/ide/probe.c
+++ b/drivers/ide/probe.c
@@ -1173,18 +1173,6 @@ static void channel_init(struct ata_channel *ch)
gd->next = NULL; /* linked list of major devs */
gd->fops = ide_fops; /* file operations */
- gd->de_arr = kmalloc(sizeof(*gd->de_arr) * MAX_DRIVES, GFP_KERNEL);
- if (gd->de_arr)
- memset(gd->de_arr, 0, sizeof(*gd->de_arr) * MAX_DRIVES);
- else
- goto err_kmalloc_gd_de_arr;
-
- gd->flags = kmalloc(sizeof(*gd->flags) * MAX_DRIVES, GFP_KERNEL);
- if (gd->flags)
- memset(gd->flags, 0, sizeof(*gd->flags) * MAX_DRIVES);
- else
- goto err_kmalloc_gd_flags;
-
ch->gd = gd;
add_gendisk(gd);