mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: Resolve Coverity FORWARD_NULL
If we jump to cleanup before allocating the 'result', then the call to virBlkioDeviceArrayClear will deref result causing a problem. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
0311be9435
commit
f28a31fcc4
@ -7683,8 +7683,10 @@ qemuDomainParseBlkioDeviceStr(char *blkioDeviceStr, const char *type,
|
||||
_("unable to parse blkio device '%s' '%s'"),
|
||||
type, blkioDeviceStr);
|
||||
cleanup:
|
||||
virBlkioDeviceArrayClear(result, ndevices);
|
||||
VIR_FREE(result);
|
||||
if (result) {
|
||||
virBlkioDeviceArrayClear(result, ndevices);
|
||||
VIR_FREE(result);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user