[PATCH] qemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune

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

 



Setting the 'group_name' for a disk would falsely trigger a error path
as in commit 4b57f76502 we did not properly check the return value of
VIR_STRDUP.
---
I must have forgotten to commit this change, as I'm sure I've tested it prior
to sending the patch mentioned above.

 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6c79d4fe3..cd513ff9f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17748,7 +17748,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,

         /* Group name needs to be copied since qemuMonitorGetBlockIoThrottle
          * allocates it as well */
-        if (VIR_STRDUP(reply.group_name, disk->blkdeviotune.group_name))
+        if (VIR_STRDUP(reply.group_name, disk->blkdeviotune.group_name) < 0)
             goto endjob;
     }

-- 
2.12.2

--
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