aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@gmail.com>2006-07-14 03:23:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-15 00:53:51 -0400
commita7546075e7c08821732fa04119a9005c55ab432d (patch)
treeab5265ed593dc6adece1014014a20424fd176184 /arch
parentb7015331098cc156c30282588bbd30bbf7a59291 (diff)
[PATCH] Fix a memory leak in the i386 setup code
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/setup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 7864395c1441..f1682206d304 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1327,7 +1327,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
1327 res->start = e820.map[i].addr; 1327 res->start = e820.map[i].addr;
1328 res->end = res->start + e820.map[i].size - 1; 1328 res->end = res->start + e820.map[i].size - 1;
1329 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 1329 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
1330 request_resource(&iomem_resource, res); 1330 if (request_resource(&iomem_resource, res)) {
1331 kfree(res);
1332 continue;
1333 }
1331 if (e820.map[i].type == E820_RAM) { 1334 if (e820.map[i].type == E820_RAM) {
1332 /* 1335 /*
1333 * We don't know which RAM region contains kernel data, 1336 * We don't know which RAM region contains kernel data,