mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
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…
x
Reference in New Issue
Block a user