]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: alias: Generate 'qomName' of disk with useraliases
authorPeter Krempa <pkrempa@redhat.com>
Fri, 16 Aug 2019 15:01:10 +0000 (17:01 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 26 Aug 2019 11:49:16 +0000 (13:49 +0200)
commitb8222be5831261578e60ce2e867a968a6f80f67d
tree5995611d8ae487549794495ac806b89203f8ea57
parentc10f09786dca93d4861bfef7a54145f18f67fdaf
qemu: alias: Generate 'qomName' of disk with useraliases

Commit fb64e176f4f forgot to delete the check that short-circuits the
disk alias creation if the alias is already present. The side effect
of this is that the creation qomName which is necessary to be able to
refer to disk frontends when -blockdev is used was skipped when user
aliases are used.

Fix it by deleting the check. Also prevent any potential memory leaks
from calling this function repeatedly by creating the qomName only when
it's not present.

https://bugzilla.redhat.com/show_bug.cgi?id=1741838

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_alias.c