diff options
| author | Christophe JAILLET <[email protected]> | 2021-09-07 21:06:32 +0000 |
|---|---|---|
| committer | Corey Minyard <[email protected]> | 2021-10-29 12:23:59 +0000 |
| commit | f281d010b87454e72475b668ad66e34961f744e0 (patch) | |
| tree | 07a0e9c6f68243f19d7ff67a11c0453c70fdede2 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
| parent | char: ipmi: replace snprintf in show functions with sysfs_emit (diff) | |
| download | kernel-f281d010b87454e72475b668ad66e34961f744e0.tar.gz kernel-f281d010b87454e72475b668ad66e34961f744e0.zip | |
ipmi: kcs_bmc: Fix a memory leak in the error handling path of 'kcs_bmc_serio_add_device()'
In the unlikely event where 'devm_kzalloc()' fails and 'kzalloc()'
succeeds, 'port' would be leaking.
Test each allocation separately to avoid the leak.
Fixes: 3a3d2f6a4c64 ("ipmi: kcs_bmc: Add serio adaptor")
Signed-off-by: Christophe JAILLET <[email protected]>
Message-Id: <ecbfa15e94e64f4b878ecab1541ea46c74807670.1631048724.git.christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Jeffery <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions
