From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 4/9] libxl: dispose dominfo to avoid leaking resource Date: Mon, 13 Jul 2015 11:05:24 +0100 Message-ID: <1436781924.7019.66.camel@citrix.com> References: <1436551257-28887-1-git-send-email-wei.liu2@citrix.com> <1436551257-28887-5-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZEac6-0007Li-A7 for xen-devel@lists.xenproject.org; Mon, 13 Jul 2015 10:05:30 +0000 In-Reply-To: <1436551257-28887-5-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 Cc: Xen-devel , Ian Jackson , Andrew Cooper List-Id: xen-devel@lists.xenproject.org On Fri, 2015-07-10 at 19:00 +0100, Wei Liu wrote: > Add libxl_dominfo_dispose to one return path that doesn't have it. > > Signed-off-by: Wei Liu That return is a bit at odds with the generally correct error handling in that function, but this improves things at least a little and I can sort of see why this a slightly special case, so: Acked-by: Ian Campbell > --- > tools/libxl/libxl_device.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c > index 2493972..3f8b555 100644 > --- a/tools/libxl/libxl_device.c > +++ b/tools/libxl/libxl_device.c > @@ -816,6 +816,8 @@ void libxl__initiate_device_remove(libxl__egc *egc, > be_path); > goto out; > } > + > + libxl_dominfo_dispose(&info); > return; > } > }