diff options
author | Pekka Paalanen <pq@iki.fi> | 2008-09-16 21:54:16 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 10:37:01 +0200 |
commit | bbe5c7830c6dbde58726d44ec0337bc8b2d95d37 (patch) | |
tree | 48ddada3c3d68db5b5476234fb04a8da768f4d9c | |
parent | 644f991d4b920ab1f5043509651479420b293490 (diff) | |
download | op-kernel-dev-bbe5c7830c6dbde58726d44ec0337bc8b2d95d37.zip op-kernel-dev-bbe5c7830c6dbde58726d44ec0337bc8b2d95d37.tar.gz |
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>
-rw-r--r-- | arch/x86/mm/mmio-mod.c | 4 |
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); |