Files
Wang Yan 58a37e7317 selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests
The regset_data buffer allocated with calloc() in the parent process
of several vector ptrace tests is never freed before returning,
causing memory leaks in:

- ptrace_v_not_enabled
- ptrace_v_early_debug
- ptrace_v_syscall_clobbering
- v_csr_invalid/ptrace_v_invalid_values
- v_csr_valid/ptrace_v_valid_values

Add free(regset_data) before kill(pid, SIGKILL) to release the
allocated buffer.

Signed-off-by: Wang Yan <[email protected]>
Reviewed-by: Sergey Matyukevich <[email protected]>
Link: https://patch.msgid.link/[email protected]
[[email protected]: Fixed Sergey's E-mail address]
Signed-off-by: Paul Walmsley <[email protected]>
2026-07-10 09:32:35 -06:00
..