]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix incorrect reference counting logic in qemu monitor open
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 13 Nov 2009 11:43:09 +0000 (11:43 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 13 Nov 2009 15:10:55 +0000 (15:10 +0000)
commit5313dc372ba5871abb7ad0e8d4a99f3c9c7ad8be
tree81dedeffcef94168652b94de6f143d459fe1113c
parent7bed630dfbad2c42788c66506325375f825918ba
Fix incorrect reference counting logic in qemu monitor open

The QEMU monitor open method would not take a reference on
the virDomainObjPtr until it had successfully opened the
monitor. The cleanup code upon failure to open though would
call qemuMonitorClose() which would in turn decrement the
reference count. This caused the virDoaminObjPtr to be mistakenly
freed and then the whole driver crashes

* src/qemu/qemu_monitor.c: Fix reference counting in
  qemuMonitorOpen
src/qemu/qemu_monitor.c