From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] libxenforeignmemory: handle partial failure correctly Date: Wed, 3 Feb 2016 11:49:49 +0000 Message-ID: <1454500189.25207.94.camel@citrix.com> References: <1454494201-14910-1-git-send-email-ian.campbell@citrix.com> <20160203101753.GD23178@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160203101753.GD23178@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: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2016-02-03 at 10:17 +0000, Wei Liu wrote: > On Wed, Feb 03, 2016 at 10:10:01AM +0000, Ian Campbell wrote: > > Coverity rightly points out that checking for ret == NULL and then > > calling osdep unmap(ret) is wrong. > > > > The intention on this code path is to turn partial failure into total > > failure when the err argument is NULL, so we want to take this patch > > whenever ret is _non_ NULL (and err_to_free is set, indicating err was > > NULL). > > > > CID: 1351219 > > > > Signed-off-by: Ian Campbell > > Acked-by: Wei Liu Applied, thanks.