diff options
| author | Yang Yingliang <[email protected]> | 2022-11-11 22:59:29 +0800 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2022-11-24 23:31:44 +1100 |
| commit | 295faa17722a11cac8dbf51e4c9f9405a5e07ef1 (patch) | |
| tree | 1f633a6c238a22f8e289d0d4e29957eb578d48f7 /tools/perf/scripts/python | |
| parent | 8bf03f557d6c6e108cf47bea32f4a68e276e1157 (diff) | |
ocxl: fix possible name leak in ocxl_file_register_afu()
If device_register() returns error in ocxl_file_register_afu(),
the name allocated by dev_set_name() need be freed. As comment
of device_register() says, it should use put_device() to give
up the reference in the error path. So fix this by calling
put_device(), then the name can be freed in kobject_cleanup(),
and info is freed in info_release().
Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend")
Signed-off-by: Yang Yingliang <[email protected]>
Acked-by: Andrew Donnellan <[email protected]>
Acked-by: Frederic Barrat <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions