<div id="geary-body" dir="auto"><div>Hi Kieran,</div></div><div id="geary-quote" dir="auto"><br>On Tue, Apr 14, 2020 at 12:29, Kieran Bingham <kieran.bingham@ideasonboard.com> wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
Looking at testFile(), doesn't the fd also leak after the call to
logSetFile(path) if that fails?

If there is the same issue in multiple places in a function I think it
should be handled by a single patch.
<br></div></blockquote><span style="white-space: pre-wrap;">Ah yes, nice catch. I missed to notice that.</span><div><span style="white-space: pre-wrap;"><br></span><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
It would be nice of course if these releases could be handled
automatically - so perhaps converting things to use FileDescriptor
classes might help, though an initial glance looks like that will always
dup() the FD which might not be particularly desirable ...

I'll leave it to you to decide, either rework to convert to
FileDescriptor objects on a per-test basis, or just do a v2 of this
patch with all paths fixed, perhaps for now just fixing this would make
coverity happy :-)</div></blockquote><span style="white-space: pre-wrap;"><div><span style="white-space: pre-wrap;"><br></span></div>I prefer to do a v2 of this patch right now. I think that porting tests/ to use FileDescriptor  itself is a</span></div><div><span style="white-space: pre-wrap;">self-contained task and should deserve a entire patchset.  We need to first investigate and analyze</span> </div><div><span style="white-space: pre-wrap;">a bit, as Laurent mentioned previously </span><span style="white-space: pre-wrap;">and extend FileDescriptor class (if required at the first place).</span></div></div><img src="https://u15657259.ct.sendgrid.net/wf/open?upn=GCEip0g28ftA9O9fsCR2M7x08El53O4YVYtHuSI-2FrLwtytoSlmO-2FnSq-2B0q807R-2FEY30j4mWvu-2FzaLZcNaNcuCVTPnDL4eVevrFgX5jrFWcTgfX-2FvdUx7AKonpKyydRoIp4shaPYFqJqPZc370Nhs-2F7gPl8l3TkVJ-2BdCxf4rRIMzcYjwh2MNr8hLZFB5IwpwxIsGqWYUbR3Qtl9RxeExcR1vqtr4hwgMiPPLseKDJrydx7r6y8V-2Fq-2FlYYBsV3dioz" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>