]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: virDomainDiskSourceFormat: check for srcpool presence correctly
authorJán Tomko <jtomko@redhat.com>
Wed, 1 Nov 2023 14:18:24 +0000 (15:18 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 21 Nov 2023 17:04:53 +0000 (18:04 +0100)
commit66e84b8a953c59d7248f62d514957cec61515eb7
tree0b875c80494e0c73d03a8345ddf341f90b361282
parent1fdca3083b52507d7a99f6e9b84e91d8df68013e
conf: virDomainDiskSourceFormat: check for srcpool presence correctly

As a guard against programming errors, one part of the condition
only dereferences srcpool if it exists, other one does not.

Move the check up one level so that it actually has a chance to do
something useful.

Fixes: 19b1c0d31988a3a10c4694c10c27eb15c018f450
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/conf/domain_conf.c