Clean stored TPM entry proof if encoding fails
This commit is contained in:
parent
4caa1f5d51
commit
aacada4135
|
|
@ -141,6 +141,8 @@ int tpm_pay(void* fc, tolling_info_t* info, void* security_socket, uint8_t* neig
|
|||
asn_enc_rval_t e_tep = uper_encode_to_buffer(&asn_DEF_TPM, NULL, tolling->station.obu.entry_proof, b_tep, 1024);
|
||||
if (e_tep.encoded == -1) {
|
||||
syslog_err("[facilities] [tolling] error encoding TPM entry proof (%s)", e_tep.failed_type->name);
|
||||
ASN_STRUCT_FREE(asn_DEF_TPM, tolling->station.obu.entry_proof);
|
||||
tolling->station.obu.entry_proof = NULL;
|
||||
rv = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue