Otherwise it is leaked. Found by code inspection.
Signed-off-by: Wei Liu <[email protected]>
---
Cc: Ian Jackson <[email protected]>
Cc: Fatih Acar <[email protected]>
Backport candidate.
---
tools/libxl/xl_cmdimpl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 7e8a8ae5c4..9bf10dfcb2 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3145,6 +3145,7 @@ start:
case DOMAIN_RESTART_RENAME:
if (domid_soft_reset == INVALID_DOMID &&
!preserve_domain(&domid, event, &d_config)) {
+ libxl_event_free(event);
/* If we fail then exit leaving the old domain in place. */
ret = -1;
goto out;
--
2.11.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel