diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b47d00f91ab85a6e7173073026bd6b440951dc4e..78b8a826074a778f91142e0a0756dd736388e4fc 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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; }