On Tue, 2019-02-19 at 15:49 +0000, Daniel P. Berrangé wrote: > On Tue, Feb 19, 2019 at 04:42:51PM +0100, Andrea Bolognani wrote: > > On Tue, 2019-02-19 at 13:58 +0000, Daniel P. Berrangé wrote: > > > IOW, if we need to report an error from the io helper, then it > > > needs to be done earlier, pehrpas in virFileWrapperFdClose ? > > > > As John noted, that's what the original implementation looked like > > but commit b0c3e931 moved the VIR_WARN() call from Close() to Free() > > to avoid the situation where jumping out from a function early > > results in the former not being called. > > I think we should really just revert that commit and make sure > the callers will invoke Close() in all paths & then make Close > use virReportError instead of WARN. Yeah, that's basically what I'm gonna try to do in v3 :) -- Andrea Bolognani / Red Hat / Virtualization