]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainAttachDiskGenericTransient: Add NULL check in case the overlay disk already...
authorMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Wed, 26 May 2021 20:19:22 +0000 (16:19 -0400)
committerJán Tomko <jtomko@redhat.com>
Thu, 27 May 2021 07:37:58 +0000 (09:37 +0200)
commite2373bd27fdc1ad87e584803f6f1ec7ecf8fee1e
treedb2605c5c38388c6fa56875a15b83392bab75059
parentb1164a8e68a5aecfc2ff420e4f31c35abbf78455
qemuDomainAttachDiskGenericTransient: Add NULL check in case the overlay disk already exists

When <transient shareBacking='yes'> is set to a disk and the overlay
disk already exists because of something abnormal, libvirt is terminated
by Segmentation fault.

  # virsh start Test0
  error: Disconnected from qemu:///system due to end of file
  error: Failed to start domain 'Test0'
  error: End of file while reading data: Input/output error

Add NULL check for snapdiskdef so that the rollback can work correctly.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Fixes: 2e94002d2ace4e4a6dbfc13a84fdab28f22c5c4a
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_hotplug.c