On Tue, Aug 19, 2025 at 04:12:12PM -0400, John Snow wrote:
> On Tue, Jul 15, 2025 at 10:32 AM Daniel P. Berrangé <berra...@redhat.com> 
> wrote:
> >
> > While QEMUQtestMachine closes the socket that was passed to
> > QEMUQtestProtocol, the python resource leak manager still
> > believes that the copy QEMUQtestProtocol holds is open. We
> > must explicitly call close to avoid this leak warnnig.
> 
> Huh. I wonder if that's a false positive, or if it's actually true?

I'm  not sure to be honest, but the extra close doesn't seem
to cause any ill effects.

> 
> >
> > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
> 
> Well, either way...
> 
> Reviewed-by: John Snow <js...@redhat.com>
> 
> > ---
> >  python/qemu/machine/qtest.py | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py
> > index 4f5ede85b2..781f674ffa 100644
> > --- a/python/qemu/machine/qtest.py
> > +++ b/python/qemu/machine/qtest.py
> > @@ -177,6 +177,8 @@ def _post_shutdown(self) -> None:
> >              self._qtest_sock_pair[0].close()
> >              self._qtest_sock_pair[1].close()
> >              self._qtest_sock_pair = None
> > +        if self._qtest is not None:
> > +            self._qtest.close()
> >          super()._post_shutdown()
> >
> >      def qtest(self, cmd: str) -> str:
> > --
> > 2.49.0
> >
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to