]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: avoid NULL derefs
authorEric Blake <eblake@redhat.com>
Mon, 14 Feb 2011 23:51:59 +0000 (16:51 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 15 Feb 2011 16:55:45 +0000 (09:55 -0700)
commitabaa65605f9424cade1fd9d0a384ab500c62cb23
tree28381091213f0e14166e3e8c2b501ed1d92f9d76
parentae891f956ed3d28740f310447c890299586325c4
qemu: avoid NULL derefs

The processWatchdogEvent fix is real, although it can only trigger
on OOM, since bad things happen if doCoreDump is called with a NULL
pathname argument.  The other fixes silence clang, but aren't a real
bug because virReportErrorHelper tolerates a NULL format string even
though *printf does not.

* src/qemu/qemu_driver.c (processWatchdogEvent): Exit on OOM.
(qemuDomainIsActive, qemuDomainIsPersistent, qemuDomainIsUpdated):
Provide valid message.
src/qemu/qemu_driver.c