Skip to content

Commit 33b0270

Browse files
sean-jcbonzini
authored andcommitted
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). Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20230711230131.648752-5-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 87d5358 commit 33b0270

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)