lkml.org 
[lkml]   [2023]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 4/7] KVM: selftests: Explicitly free vcpus array in binary stats test
From
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>
---
tools/testing/selftests/kvm/kvm_binary_stats_test.c | 1 +
1 file changed, 1 insertion(+)

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 */
}
--
2.41.0.255.g8b1d071c50-goog
\
 
 \ /
  Last update: 2023-07-12 01:02    [W:0.106 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site