[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.6 11/13] xl: free event struct after use in main_shutdown_or_reboot



On Thu, 2015-07-23 at 08:59 +0100, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>

It appears there is no libxl_evgen_domain_death_dispose to call on the
individual members of the array. Ah, because it is opaque.

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Although since it is init'd to NULL you could also call free
unconditionally.

> ---
>  tools/libxl/xl_cmdimpl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 3717568..9edc0db 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -4766,8 +4766,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 {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.