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.
This commit is contained in:
Peter Krempa 2017-05-23 17:21:56 +02:00
parent 6de895f64c
commit 3fe624b268

View File

@ -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;
}