Skip to content

Commit cd07c2c

Browse files
yonghuahlijinxia
authored andcommitted
DM: initialize 'create_vm' before reference it in 'vm_open'
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
1 parent eb943e7 commit cd07c2c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

devicemodel/core/vmmapi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ vm_open(const char *name)
112112
int error, retry = 10;
113113
uuid_t vm_uuid;
114114

115+
memset(&create_vm, 0, sizeof(struct acrn_create_vm));
115116
ctx = calloc(1, sizeof(struct vmctx) + strlen(name) + 1);
116117
assert(ctx != NULL);
117118
assert(devfd == -1);

0 commit comments

Comments
 (0)