mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 06:51:49 +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:
parent
4b750331b1
commit
aaeb52577f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user