Skip to content

Commit

Permalink
KVM: selftests: Explicitly free vcpus array in binary stats test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sean-jc committed Jul 24, 2023
1 parent 34ffae5 commit 0dec048
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/kvm/kvm_binary_stats_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}

0 comments on commit 0dec048

Please sign in to comment.