Re: [PATCH 1/2] qemu: Use the return value of virObjectRef directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/02/2018 01:13 PM, Marc Hartmayer wrote:
> Use the return value of virObjectRef directly. This way, it's easier
> for another reader to identify the reason why the additional reference
> is required.
> 
> Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)

Missed one:

diff --git i/src/qemu/qemu_process.c w/src/qemu/qemu_process.c
index c17a6e9ab..342339d5f 100644
--- i/src/qemu/qemu_process.c
+++ w/src/qemu/qemu_process.c
@@ -1033,11 +1033,10 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
         if (VIR_STRDUP(data, diskAlias) < 0)
             goto error;
         processEvent->data = data;
-        processEvent->vm = vm;
+        processEvent->vm = virObjectRef(vm);
         processEvent->action = type;
         processEvent->status = status;
 
-        virObjectRef(vm);
         if (virThreadPoolSendJob(driver->workerPool, 0, processEvent) < 0) {
             ignore_value(virObjectUnref(vm));
             goto error;

ACK with this squashed in.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux