diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2025-07-15 15:30:20 +0100 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2025-09-15 14:36:01 -0400 |
commit | 6ccb48ffc19fe25511313a246d4a8bad51114ea9 (patch) | |
tree | f68ee5481bbf9d8646f3524c853fe1658b64ee7c /python/qemu/machine/qtest.py | |
parent | 82c7cb93c750196f513a1b11cb85e0328bad444f (diff) | |
download | qemu-6ccb48ffc19fe25511313a246d4a8bad51114ea9.zip qemu-6ccb48ffc19fe25511313a246d4a8bad51114ea9.tar.gz qemu-6ccb48ffc19fe25511313a246d4a8bad51114ea9.tar.bz2 |
python: ensure QEMUQtestProtocol closes its socket
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.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'python/qemu/machine/qtest.py')
-rw-r--r-- | python/qemu/machine/qtest.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 4f5ede8..781f674 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -177,6 +177,8 @@ class QEMUQtestMachine(QEMUMachine): 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: |