From: Peter Krempa Date: Tue, 23 May 2017 15:21:56 +0000 (+0200) Subject: qemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune X-Git-Tag: v3.4.0-rc1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fe624b2689d825a47e86ae3fb9735313e9105c3;p=thirdparty%2Flibvirt.git qemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune 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. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6c79d4fe31..cd513ff9f8 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; }