Skip to content

Commit 0dec048

Browse files
committed
KVM: selftests: Explicitly free vcpus array in binary stats test
Explicitly free the all-encompassing vcpus array in the binary stats test so that the test is consistent with respect to freeing all dynamically allocated resources (versus letting them be freed on exit). Link: https://lore.kernel.org/r/20230711230131.648752-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 34ffae5 commit 0dec048

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/kvm/kvm_binary_stats_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ int main(int argc, char *argv[])
236236
for (i = 0; i < max_vm; ++i)
237237
kvm_vm_free(vms[i]);
238238
free(vms);
239+
free(vcpus);
239240

240241
ksft_finished(); /* Print results and exit() accordingly */
241242
}

0 commit comments

Comments
 (0)