mirror of
https://github.com/systemd/systemd.git
synced 2025-01-20 18:04:03 +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 */
|
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;
|
bool found_some = false;
|
||||||
int token = 0; /* first token to look at */
|
int token = 0; /* first token to look at */
|
||||||
|
|
||||||
@ -1734,6 +1733,7 @@ static int attach_luks_or_plain_or_bitlk_by_tpm2(
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
_cleanup_(iovec_done) struct iovec pubkey = {}, salt = {}, srk = {}, pcrlock_nv = {};
|
_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;
|
uint32_t hash_pcr_mask, pubkey_pcr_mask;
|
||||||
uint16_t pcr_bank, primary_alg;
|
uint16_t pcr_bank, primary_alg;
|
||||||
TPM2Flags tpm2_flags;
|
TPM2Flags tpm2_flags;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user