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>
This commit is contained in:
parent
644f991d4b
commit
bbe5c7830c
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue