Add free to allocated buffer while error

pull/9668/head
Moran Peker 2019-02-26 15:10:11 +02:00
parent a268b81a57
commit 7dd58b99cc
1 changed files with 1 additions and 0 deletions

View File

@ -205,6 +205,7 @@ static void psa_attest_inject_key(void)
key_data, msg.in_size[1]);
if (bytes_read != msg.in_size[1]) {
free(public_key_data);
free(key_data);
SPM_PANIC("SPM read length mismatch");
}
}