diff options
author | Borislav Petkov <bp@suse.de> | 2019-04-20 22:39:24 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2019-06-08 18:35:04 +0300 |
commit | d0e375e8f26edd2e577e3afa9d952f91037cbd87 (patch) | |
tree | 1763380ce79d65b02b2361b7c3ac3a2a58aaeae3 /drivers/ras/cec.c | |
parent | 5cc6b16ea1313d05956b55e83a1f753c604282a8 (diff) | |
download | linux-d0e375e8f26edd2e577e3afa9d952f91037cbd87.tar.xz |
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>
Diffstat (limited to 'drivers/ras/cec.c')
-rw-r--r-- | drivers/ras/cec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c index 31868bd99e8d..f57e869dfea2 100644 --- a/drivers/ras/cec.c +++ b/drivers/ras/cec.c @@ -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); |