mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
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>
(cherry picked from commit 6ccb48ffc1)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
committed by
Michael Tokarev
parent
8d7385b2a7
commit
6a59e3c5b0
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user