提交 2cc317b1 编写于 作者: J Jiri Denemark

qemu_blockjob: Avoid dereferencing NULL on OOM

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 b97839b8
...@@ -123,7 +123,8 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver, ...@@ -123,7 +123,8 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
if ((persistDisk = virDomainDiskByName(vm->newDef, if ((persistDisk = virDomainDiskByName(vm->newDef,
disk->dst, false))) { disk->dst, false))) {
copy = virStorageSourceCopy(disk->mirror, false); copy = virStorageSourceCopy(disk->mirror, false);
if (virStorageSourceInitChainElement(copy, if (!copy ||
virStorageSourceInitChainElement(copy,
persistDisk->src, persistDisk->src,
true) < 0) { true) < 0) {
VIR_WARN("Unable to update persistent definition " VIR_WARN("Unable to update persistent definition "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册