]> xenbits.xensource.com Git - xen.git/commitdiff
xl: free event struct after use in main_shutdown_or_reboot
authorWei Liu <wei.liu2@citrix.com>
Thu, 23 Jul 2015 07:59:12 +0000 (08:59 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 24 Jul 2015 10:27:53 +0000 (11:27 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/xl_cmdimpl.c

index e90521aa5c4644e3f680dea99a325f99b8b9c68a..de1c9c029d6502ac51237f8fb19b59787c3905b8 100644 (file)
@@ -4781,8 +4781,10 @@ static int main_shutdown_or_reboot(int do_reboot, int argc, char **argv)
                fallback_trigger);
         }
 
-        if (wait_for_it)
+        if (wait_for_it) {
             wait_for_domain_deaths(deathws, nb_domain - 1 /* not dom 0 */);
+            free(deathws);
+        }
 
         libxl_dominfo_list_free(dominfo, nb_domain);
     } else {