mirror of https://github.com/ARMmbed/mbed-os.git
Add free to allocated buffer while error
parent
a268b81a57
commit
7dd58b99cc
|
@ -205,6 +205,7 @@ static void psa_attest_inject_key(void)
|
||||||
key_data, msg.in_size[1]);
|
key_data, msg.in_size[1]);
|
||||||
if (bytes_read != msg.in_size[1]) {
|
if (bytes_read != msg.in_size[1]) {
|
||||||
free(public_key_data);
|
free(public_key_data);
|
||||||
|
free(key_data);
|
||||||
SPM_PANIC("SPM read length mismatch");
|
SPM_PANIC("SPM read length mismatch");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue