]> xenbits.xensource.com Git - libvirt.git/commit
virCryptoEncryptDataAESgnutls: Restructure control flow
authorPeter Krempa <pkrempa@redhat.com>
Thu, 8 Dec 2022 11:44:27 +0000 (12:44 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 1 Feb 2023 08:16:17 +0000 (09:16 +0100)
commit880cd081deccf68346cbed14a3207623523dbfa4
treed47dd850fe3c30337e1713bd26d4a8904eeaaa25
parentdd8a2cffd650f387295d1741aa273b81ae38383d
virCryptoEncryptDataAESgnutls: Restructure control flow

Prepare the buffer for encryption only after initializing the cipher, so
that there's just one failure point. This allows to remove the 'error'
label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/util/vircrypto.c