kernel_optimize_test/lib/livepatch
Yannick Cote 270f7806d3 selftests/livepatch: fix mem leaks in test-klp-shadow-vars
In some cases, when an error occurs during testing and the main test
routine returns, a memory leak occurs via leaving previously registered
shadow variables allocated in the kernel as well as shadow_ptr list
elements. From now on, in case of error, remove all allocated shadow
variables and shadow_ptr struct elements.

Signed-off-by: Yannick Cote <ycote@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200603182058.109470-5-ycote@redhat.com
2020-06-08 10:55:10 +02:00
..
Makefile livepatch: Selftests of the API for tracking system state changes 2019-11-01 13:08:29 +01:00
test_klp_atomic_replace.c
test_klp_callbacks_busy.c selftests/livepatch: simplify test-klp-callbacks busy target tests 2020-06-08 10:36:10 +02:00
test_klp_callbacks_demo.c
test_klp_callbacks_demo2.c
test_klp_callbacks_mod.c
test_klp_livepatch.c
test_klp_shadow_vars.c selftests/livepatch: fix mem leaks in test-klp-shadow-vars 2020-06-08 10:55:10 +02:00
test_klp_state.c livepatch: Selftests of the API for tracking system state changes 2019-11-01 13:08:29 +01:00
test_klp_state2.c livepatch: Selftests of the API for tracking system state changes 2019-11-01 13:08:29 +01:00
test_klp_state3.c livepatch: Selftests of the API for tracking system state changes 2019-11-01 13:08:29 +01:00