Skip to content

Commit 7dd58b9

Browse files
author
Moran Peker
committed
Add free to allocated buffer while error
1 parent a268b81 commit 7dd58b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/TARGET_PSA/services/attestation/COMPONENT_SPE/psa_attestation_partition.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ static void psa_attest_inject_key(void)
205205
key_data, msg.in_size[1]);
206206
if (bytes_read != msg.in_size[1]) {
207207
free(public_key_data);
208+
free(key_data);
208209
SPM_PANIC("SPM read length mismatch");
209210
}
210211
}

0 commit comments

Comments
 (0)