From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.6 11/13] xl: free event struct after use in main_shutdown_or_reboot Date: Thu, 23 Jul 2015 10:52:26 +0100 Message-ID: <1437645146.19412.84.camel@citrix.com> References: <1437638354-14216-1-git-send-email-wei.liu2@citrix.com> <1437638354-14216-12-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZIDB1-0001rp-LN for xen-devel@lists.xenproject.org; Thu, 23 Jul 2015 09:52:31 +0000 In-Reply-To: <1437638354-14216-12-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu , Xen-devel Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org On Thu, 2015-07-23 at 08:59 +0100, Wei Liu wrote: > Signed-off-by: Wei Liu 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 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 {