mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
vpic: use calloc to init vpic instead of malloc
vpic struct should be init as 0 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -930,7 +930,7 @@ void *vpic_init(struct vm *vm)
|
||||
|
||||
vpic_register_io_handler(vm);
|
||||
|
||||
vpic = malloc(sizeof(struct vpic));
|
||||
vpic = calloc(1, sizeof(struct vpic));
|
||||
ASSERT(vpic != NULL, "");
|
||||
vpic->vm = vm;
|
||||
vpic->pic[0].mask = 0xff;
|
||||
|
Reference in New Issue
Block a user