mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
cryptsetup: Fix memory leak when iterating over systemd-tpm2 tokens
This commit is contained in:
parent
47b425de0c
commit
4a67075007
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user