From cd07c2c9a4ba856ed14b95dded5ca0b54d523f8c Mon Sep 17 00:00:00 2001 From: Yonghua Huang Date: Tue, 22 May 2018 18:58:34 +0800 Subject: [PATCH] DM: initialize 'create_vm' before reference it in 'vm_open' Signed-off-by: Yonghua Huang --- devicemodel/core/vmmapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/devicemodel/core/vmmapi.c b/devicemodel/core/vmmapi.c index 1c09f6257..0f22c0a79 100644 --- a/devicemodel/core/vmmapi.c +++ b/devicemodel/core/vmmapi.c @@ -112,6 +112,7 @@ vm_open(const char *name) int error, retry = 10; uuid_t vm_uuid; + memset(&create_vm, 0, sizeof(struct acrn_create_vm)); ctx = calloc(1, sizeof(struct vmctx) + strlen(name) + 1); assert(ctx != NULL); assert(devfd == -1);