]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: minor monitor lock cleanups
authorEric Blake <eblake@redhat.com>
Fri, 22 Feb 2013 20:19:43 +0000 (13:19 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 26 Feb 2013 00:36:51 +0000 (17:36 -0700)
commit6abd5ea124f173dd0bb68f6cdd1a175d103b517d
tree3f622273d1708e2019fc3f29b2e92ce3f0d788f5
parent29424d1acd5a0c2e77d8d99372ee531bfe57d36a
qemu: minor monitor lock cleanups

If virCondInit fails (okay, so that's unlikely), then we end up
attempting a virObjectUnlock() on the cleanup path, even though
we don't hold a lock.  This is not guaranteed to be safe.  While
at it, I noticed a couple places where we were referencing mon->fd
outside locks.

* src/qemu/qemu_monitor.c (qemuMonitorOpenInternal): Minimize lock
duration.  mon->watch doesn't need clean up on error.
(qemuMonitorGetBlockExtent, qemuMonitorBlockResize): Don't
dereference fd outside of lock.
src/qemu/qemu_monitor.c