mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
RAS/CEC: Fix potential memory leak
Free the array page if a failure is encountered while creating the debugfs nodes. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org>
This commit is contained in:
parent
5cc6b16ea1
commit
d0e375e8f2
@ -504,8 +504,10 @@ void __init cec_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (create_debugfs_nodes())
|
||||
if (create_debugfs_nodes()) {
|
||||
free_page((unsigned long)ce_arr.array);
|
||||
return;
|
||||
}
|
||||
|
||||
INIT_DELAYED_WORK(&cec_work, cec_work_fn);
|
||||
schedule_delayed_work(&cec_work, CEC_DECAY_DEFAULT_INTERVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user