]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virStorageEncryptionSecretCopy: Properly copy internals
authorPeter Krempa <pkrempa@redhat.com>
Thu, 19 Mar 2020 14:38:06 +0000 (15:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 20 Mar 2020 08:47:16 +0000 (09:47 +0100)
commit299796328c34a30295d6cdc7ebce5d65843e921f
treefe9bc433d64c48f70eab452f777fb5502a00c896
parent02f909b8a6ad8c271693fed9ceab606f0dda2294
virStorageEncryptionSecretCopy: Properly copy internals

virStorageEncryptionSecretPtr may have a string inside it, thus we must
copy the string too. Use virSecretLookupDefCopy to do that.

Caused by non-obvious code introduced in 756b46ddd24 and later 47e88b33b
which added a string that needed to be copied.

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virstorageencryption.c