summaryrefslogtreecommitdiff
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-09-16 18:54:16 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-10-14 08:37:01 (GMT)
commitbbe5c7830c6dbde58726d44ec0337bc8b2d95d37 (patch)
tree48ddada3c3d68db5b5476234fb04a8da768f4d9c /arch/x86/mm
parent644f991d4b920ab1f5043509651479420b293490 (diff)
downloadlinux-bbe5c7830c6dbde58726d44ec0337bc8b2d95d37.tar.xz
x86 mmiotrace: fix a rare memory leak
Signed-off-by: Pekka Paalanen <pq@iki.fi> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/mmio-mod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index 635b50e..754bd1e 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -307,8 +307,10 @@ static void ioremap_trace_core(resource_size_t offset, unsigned long size,
map.map_id = trace->id;
spin_lock_irq(&trace_lock);
- if (!is_enabled())
+ if (!is_enabled()) {
+ kfree(trace);
goto not_enabled;
+ }
mmio_trace_mapping(&map);
list_add_tail(&trace->list, &trace_list);