mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
dm: fix some potential memory leaks
This patch is to fix some potential memory leak issues 1, free mrp if the mmio_rb_lookup() function return 0; 2, free memory allocated by strdup in some error case handling. Tracked-On: #3277 Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -4126,6 +4126,8 @@ errout:
|
||||
free(xdev->portregs);
|
||||
xdev->portregs = NULL;
|
||||
}
|
||||
if (rc < -2 && s)
|
||||
free(s);
|
||||
UPRINTF(LFTL, "fail to parse xHCI options, rc=%d\r\n", rc);
|
||||
|
||||
if (opts)
|
||||
|
||||
Reference in New Issue
Block a user