From df4d268e35a02ae1723c71f46d1fa0f2397031d7 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 2 Feb 2017 15:30:32 +0000 Subject: [PATCH] xl: free event in DOMAIN_RESTART_RENAME error path Otherwise it is leaked. Found by code inspection. Signed-off-by: Wei Liu Acked-by: Ian Jackson --- 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 196b8a6851..b25ac6efa0 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3146,6 +3146,7 @@ start: case DOMAIN_RESTART_RENAME: if (domid_soft_reset == INVALID_DOMID && !preserve_domain(&domid, event, &d_config)) { + libxl_event_free(ctx, event); /* If we fail then exit leaving the old domain in place. */ ret = -1; goto out; -- 2.39.5