Commit a7546075 authored by Catalin Marinas's avatar Catalin Marinas Committed by Linus Torvalds

[PATCH] Fix a memory leak in the i386 setup code

Signed-off-by: default avatarCatalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b7015331
...@@ -1327,7 +1327,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat ...@@ -1327,7 +1327,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
res->start = e820.map[i].addr; res->start = e820.map[i].addr;
res->end = res->start + e820.map[i].size - 1; res->end = res->start + e820.map[i].size - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
request_resource(&iomem_resource, res); if (request_resource(&iomem_resource, res)) {
kfree(res);
continue;
}
if (e820.map[i].type == E820_RAM) { if (e820.map[i].type == E820_RAM) {
/* /*
* We don't know which RAM region contains kernel data, * We don't know which RAM region contains kernel data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment