[PATCH v1 10/10] KVM: arm64: selftests: Free the thread arrays in vgic_lpi_stress

From: Fuad Tabba

Date: Mon Sep 28 2026 - 11:45:30 EST


run_test() allocates the vCPU and LPI thread arrays and never frees
them, while destroy_vm() frees the rest of the test's allocations. Free
them once the threads have been joined.

Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
---
tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c b/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
index 9a69c439a0f8f..d09db95db3bd5 100644
--- a/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
+++ b/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
@@ -330,6 +330,9 @@ static void run_test(void)
kvm_pthread_join(vcpu_threads[i], NULL);

report_stats(delta);
+
+ free(lpi_threads);
+ free(vcpu_threads);
}

static void setup_vm(void)
--
2.39.5