mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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,
|
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 "
|
||||||
|
Loading…
Reference in New Issue
Block a user