]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tpm2-util: declare the cleanup attribute first 30639/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 26 Dec 2023 20:24:14 +0000 (21:24 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 27 Dec 2023 10:15:48 +0000 (11:15 +0100)
As we do everywhere else (apart from it being incosistent, the switched
order also makes Coccinelle unhappy).

src/shared/tpm2-util.c

index 2a75db572dd5d7c8e0b11be45c91be3e8acf9034..80a0d5f2dc60838c7765113723177e1e870051df 100644 (file)
@@ -7569,7 +7569,7 @@ int tpm2_util_pbkdf2_hmac_sha256(const void *pass,
                     size_t saltlen,
                     uint8_t ret_key[static SHA256_DIGEST_SIZE]) {
 
-        uint8_t _cleanup_(erase_and_freep) *buffer = NULL;
+        _cleanup_(erase_and_freep) uint8_t *buffer = NULL;
         uint8_t u[SHA256_DIGEST_SIZE];
 
         /* To keep this simple, since derived KeyLen (dkLen in docs)