From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 4/4] tools/libxl: Fix memory leak in sched_domain_output() Date: Mon, 25 Nov 2013 13:48:49 +0000 Message-ID: <52935541.4030200@citrix.com> References: <1385377973-21401-1-git-send-email-andrew.cooper3@citrix.com> <1385377973-21401-5-git-send-email-andrew.cooper3@citrix.com> <21139.21666.281397.755233@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21139.21666.281397.755233@mariner.uk.xensource.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: Ian Jackson Cc: Keir Fraser , Ian Campbell , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On 25/11/13 13:46, Ian Jackson wrote: > Andrew Cooper writes ("[Xen-devel] [PATCH 4/4] tools/libxl: Fix memory leak in sched_domain_output()"): >> Coverity ID: 1055904 >> >> Signed-off-by: Andrew Cooper >> CC: Keir Fraser >> CC: Jan Beulich > Acked-by: Ian Jackson > Cc: Ian Campbell > Committed-by: Ian Jackson > > The error handling in this function is odd. It would be better to > change it to "goto out" but then I started looking at the return types > of this and of other functions in xl_cmdimpl.c. > > "return -ERROR_FAIL" ?! > > And later we have functions which > return -sched_domain_output(...) > but also > return 1 > > Ian. Yes - I found the error handling quite odd. I decided not to poke the tangled mess. ~Andrew