cryptsetup: Fix memory leak when iterating over systemd-tpm2 tokens
This commit is contained in:
@@ -1724,7 +1724,6 @@ static int attach_luks_or_plain_or_bitlk_by_tpm2(
|
||||
}
|
||||
|
||||
if (r == -EOPNOTSUPP) { /* Plugin not available, let's process TPM2 stuff right here instead */
|
||||
_cleanup_(iovec_done) struct iovec blob = {}, policy_hash = {};
|
||||
bool found_some = false;
|
||||
int token = 0; /* first token to look at */
|
||||
|
||||
@@ -1734,6 +1733,7 @@ static int attach_luks_or_plain_or_bitlk_by_tpm2(
|
||||
|
||||
for (;;) {
|
||||
_cleanup_(iovec_done) struct iovec pubkey = {}, salt = {}, srk = {}, pcrlock_nv = {};
|
||||
_cleanup_(iovec_done) struct iovec blob = {}, policy_hash = {};
|
||||
uint32_t hash_pcr_mask, pubkey_pcr_mask;
|
||||
uint16_t pcr_bank, primary_alg;
|
||||
TPM2Flags tpm2_flags;
|
||||
|
||||
Reference in New Issue
Block a user