mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-01 11:55:25 +00:00
tools:acrn-crashlog: fix potential memory corruption
Make sure vm event is not NULL before freeing vm_msg. Tracked-On: #1024 Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com> Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com> Acked-by: Chen, Gang <gang.c.chen@intel.com>
This commit is contained in:
parent
5a23f7b664
commit
0a461a4532
@ -177,7 +177,7 @@ static void *event_handle(void *unused __attribute__((unused)))
|
||||
|
||||
if (e->event_type == VM) {
|
||||
vme = (struct vm_event_t *)e->private;
|
||||
if (vme->vm_msg)
|
||||
if (vme && vme->vm_msg)
|
||||
free(vme->vm_msg);
|
||||
if (vme)
|
||||
free(vme);
|
||||
|
Loading…
Reference in New Issue
Block a user