aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-09-16 14:54:16 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:37:01 -0400
commitbbe5c7830c6dbde58726d44ec0337bc8b2d95d37 (patch)
tree48ddada3c3d68db5b5476234fb04a8da768f4d9c /arch
parent644f991d4b920ab1f5043509651479420b293490 (diff)
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')
-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 635b50e85581..754bd1eaf4f6 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,
307 map.map_id = trace->id; 307 map.map_id = trace->id;
308 308
309 spin_lock_irq(&trace_lock); 309 spin_lock_irq(&trace_lock);
310 if (!is_enabled()) 310 if (!is_enabled()) {
311 kfree(trace);
311 goto not_enabled; 312 goto not_enabled;
313 }
312 314
313 mmio_trace_mapping(&map); 315 mmio_trace_mapping(&map);
314 list_add_tail(&trace->list, &trace_list); 316 list_add_tail(&trace->list, &trace_list);