mirror of https://gitee.com/openkylin/libvirt.git
qemu_blockjob: Avoid dereferencing NULL on OOM
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
b97839b835
commit
2cc317b1f5
|
@ -123,7 +123,8 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
|
|||
if ((persistDisk = virDomainDiskByName(vm->newDef,
|
||||
disk->dst, false))) {
|
||||
copy = virStorageSourceCopy(disk->mirror, false);
|
||||
if (virStorageSourceInitChainElement(copy,
|
||||
if (!copy ||
|
||||
virStorageSourceInitChainElement(copy,
|
||||
persistDisk->src,
|
||||
true) < 0) {
|
||||
VIR_WARN("Unable to update persistent definition "
|
||||
|
|
Loading…
Reference in New Issue