Files
Rui Qi 7203abb3f8 selftests/livepatch: fix resource leak in test_klp_syscall init error path
In livepatch_init(), if klp_enable_patch() fails, the previously
created kobject and sysfs file are never cleaned up, causing a
resource leak. Capture the return value and add proper cleanup
on the error path.

Signed-off-by: Rui Qi <[email protected]>
Acked-by: Miroslav Benes <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Petr Mladek <[email protected]>
2026-06-09 12:38:33 +02:00
..