From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH v3 19/28] tools/libxl: Convert a legacy stream if needed Date: Mon, 13 Jul 2015 16:44:37 +0100 Message-ID: <21923.56549.491164.979239@mariner.uk.xensource.com> References: <1436788907-1921-1-git-send-email-andrew.cooper3@citrix.com> <1436788907-1921-20-git-send-email-andrew.cooper3@citrix.com> <21923.53345.222120.747892@mariner.uk.xensource.com> <55A3D746.5010309@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A3D746.5010309@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: Andrew Cooper Cc: Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("Re: [PATCH v3 19/28] tools/libxl: Convert a legacy stream if needed"): > On 13/07/15 15:51, Ian Jackson wrote: > > This would be more obviously correct (or at least more obviously never > > leak a carefd) if you set v2_carefd to NULL here, and asserted its > > NULLness at the end of check_all_finished just before making the > > callback. > > This argument applies to all the cleanup in this function, but we > already assert that stream_done() is strictly executed once. > > It would seem wrong to me to check just v2_carefd here, given all the > other resources in need of cleanup. Fair enought. thanks, Ian.