]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: domainjob: Allow operations if cb is not set in job structure
authorKristina Hanicova <khanicov@redhat.com>
Wed, 16 Mar 2022 14:08:38 +0000 (15:08 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Mar 2022 15:27:16 +0000 (16:27 +0100)
commit965f872f9221466b1d8a285471dce3120aec2ac3
tree23dd8a19e0236f8c7d64fdbc1ce1c0b4d8eb39ec
parent86dc94fbb60833e18174384b7cf999e8e421c929
qemu: domainjob: Allow operations if cb is not set in job structure

We should allow resetting / freeing / restoring / parsing /
formatting qemuDomainJobObj even if 'cb' attribute is not set.
This is theoretical for now, but the attribute must not be always
set in the future. It is sufficient to check if 'cb' exists
before dereferencing it.

This commit partially reverts af16e754cd4efc3ca1.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domainjob.c