[libvirt] [PATCH V3 2/2] enhance processWatchdogEvent()
Eric Blake
eblake at redhat.com
Mon Apr 18 15:32:29 UTC 2011
On 04/18/2011 09:15 AM, Eric Blake wrote:
>> I think we also need this added:
>>
>> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
>> index d405dda..5a81265 100644
>> --- a/src/qemu/qemu_process.c
>> +++ b/src/qemu/qemu_process.c
>> @@ -433,14 +433,16 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
>> */
>> virDomainObjRef(vm);
>> if (virThreadPoolSendJob(driver->workerPool, wdEvent) < 0) {
>> - virDomainObjUnref(vm);
>> + if (virDomainObjUnref(vm) < 0)
>> + vm = NULL;
>> VIR_FREE(wdEvent);
>> }
>> } else
>> virReportOOMError();
>> }
>
> While we're at it, let's fix this else branch to have proper {} usage,
> per HACKING style guidelines.
>
>>
>> - virDomainObjUnlock(vm);
>> + if (vm)
>> + virDomainObjUnlock(vm);
>
> ACK.
I've gone ahead and pushed this under your name, under the build-breaker
rule.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110418/ed79c98c/attachment-0001.sig>
More information about the libvir-list
mailing list