diff options
author | Sean Christopherson <seanjc@google.com> | 2023-07-11 16:01:28 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-07-29 11:05:29 -0400 |
commit | 33b02704071b0972a62ec32516847f91cab6cb8f (patch) | |
tree | 60b44491fa26873ed1fe6ee7cd8f353eef1742e3 | |
parent | 87d53582bc8be30a11654a45fac0a257ed830ea8 (diff) | |
download | lwn-33b02704071b0972a62ec32516847f91cab6cb8f.tar.gz lwn-33b02704071b0972a62ec32516847f91cab6cb8f.zip |
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>
-rw-r--r-- | tools/testing/selftests/kvm/kvm_binary_stats_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/kvm_binary_stats_test.c b/tools/testing/selftests/kvm/kvm_binary_stats_test.c index f02663711c90..874fa5092551 100644 --- a/tools/testing/selftests/kvm/kvm_binary_stats_test.c +++ b/tools/testing/selftests/kvm/kvm_binary_stats_test.c @@ -236,6 +236,7 @@ int main(int argc, char *argv[]) for (i = 0; i < max_vm; ++i) kvm_vm_free(vms[i]); free(vms); + free(vcpus); ksft_finished(); /* Print results and exit() accordingly */ } |