mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
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:
parent
6de895f64c
commit
3fe624b268
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user