aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorWenwen Wang <[email protected]>2019-07-14 06:11:35 +0000
committerGreg Kroah-Hartman <[email protected]>2019-07-25 12:39:52 +0000
commitd4fddac5a51c378c5d3e68658816c37132611e1f (patch)
treeeb60738ab242cb89e026fda8b0deca5bf06ebe27 /scripts/gcc-plugins/randomize_layout_plugin.c
parenthpet: Fix division by zero in hpet_time_div() (diff)
downloadkernel-d4fddac5a51c378c5d3e68658816c37132611e1f.tar.gz
kernel-d4fddac5a51c378c5d3e68658816c37132611e1f.zip
test_firmware: fix a memory leak bug
In test_firmware_init(), the buffer pointed to by the global pointer 'test_fw_config' is allocated through kzalloc(). Then, the buffer is initialized in __test_firmware_config_init(). In the case that the initialization fails, the following execution in test_firmware_init() needs to be terminated with an error code returned to indicate this failure. However, the allocated buffer is not freed on this execution path, leading to a memory leak bug. To fix the above issue, free the allocated buffer before returning from test_firmware_init(). Signed-off-by: Wenwen Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions