From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH] libxl: close fd's in parent when spawning qdisk Date: Tue, 16 Feb 2016 12:59:54 +0000 Message-ID: <20160216125954.GN10489@citrix.com> References: <1455623393-17364-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1455623393-17364-1-git-send-email-ian.campbell@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: Ian Campbell Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Feb 16, 2016 at 11:49:53AM +0000, Ian Campbell wrote: > Coverity points out that these remain open in the parent upon > success, which is a resource leak. > > To fix this rejig the exit paths such that success and error cases > both close the two fds, this means adjusting the callback to only > happen for the error case and it also makes sense to rename the label > from "error" to just "out". > > Compile tested only. > > CID: 1130518 (null) and 1130517 (logfile_w). > > Signed-off-by: Ian Campbell Acked-by: Wei Liu