[libfko] fix memory leak in fko_encode_spa_data() caught by Coverity
This commit is contained in:
parent
41f12eba81
commit
6b87710397
@ -201,7 +201,10 @@ fko_encode_spa_data(fko_ctx_t ctx)
|
|||||||
ctx->encoded_msg_len = strnlen(ctx->encoded_msg, MAX_SPA_ENCODED_MSG_SIZE);
|
ctx->encoded_msg_len = strnlen(ctx->encoded_msg, MAX_SPA_ENCODED_MSG_SIZE);
|
||||||
|
|
||||||
if(! is_valid_encoded_msg_len(ctx->encoded_msg_len))
|
if(! is_valid_encoded_msg_len(ctx->encoded_msg_len))
|
||||||
|
{
|
||||||
|
free(tbuf);
|
||||||
return(FKO_ERROR_INVALID_DATA_ENCODE_MSGLEN_VALIDFAIL);
|
return(FKO_ERROR_INVALID_DATA_ENCODE_MSGLEN_VALIDFAIL);
|
||||||
|
}
|
||||||
|
|
||||||
/* At this point we can compute the digest for this SPA data.
|
/* At this point we can compute the digest for this SPA data.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user