DM: initialize 'create_vm' before reference it in 'vm_open'

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang 2018-05-22 18:58:34 +08:00 committed by lijinxia
parent eb943e7b13
commit cd07c2c9a4
1 changed files with 1 additions and 0 deletions

View File

@ -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);