summaryrefslogtreecommitdiffstats
path: root/test/kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/kvm.c')
-rw-r--r--test/kvm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/kvm.c b/test/kvm.c
index d50e4fe..6c888c1 100644
--- a/test/kvm.c
+++ b/test/kvm.c
@@ -28,8 +28,9 @@
#include <stdio.h>
#include <stdlib.h>
-int kvm_dev, sev_dev;
-const char *vmtype;
+int kvm_dev = -1;
+int sev_dev = -1;
+const char *vmtype = NULL;
const char *sev_fwerr_strs[] = {
[0x00] = "Success",
@@ -504,5 +505,8 @@ void
kvm_setup_deinit(void)
{
close(kvm_dev);
+ kvm_dev = -1;
+
close(sev_dev);
+ sev_dev = -1;
}