]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: attach: Close monitor socket on connection failure
authorPeter Krempa <pkrempa@redhat.com>
Mon, 3 Oct 2016 11:11:47 +0000 (13:11 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 5 Oct 2016 06:52:34 +0000 (08:52 +0200)
commit2c739866df5a820b2db280b36cd8b6fe00cfba58
tree015278386f3a6880b67d2318e7126a7323d43ad4
parent62135ff692044a0a7cac5ee91f2cb42463550052
qemu: attach: Close monitor socket on connection failure

If attaching to a qemu process fails after opening the monitor socket
libvirt does not clean up the monitor. As the monitor also holds a
reference to the domain object the qemu attach API basically leaks it.

QEMU also does not interact on a second monitor connection and thus a
further attempt to attach to it would lock up.

Prevent libvirt from leaking the monitor by explicitly closing it.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1378401
src/qemu/qemu_process.c