[HUST CSE]avoids the risk of a null pointer (#7209)

This commit is contained in:
Hy 2023-04-11 21:07:07 +08:00 committed by GitHub
parent 7509f55641
commit d120cf08ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ cy_rslt_t cyhal_crc_init(cyhal_crc_t *obj)
void cyhal_crc_free(cyhal_crc_t *obj)
{
CY_ASSERT(NULL != obj || obj->resource.type != CYHAL_RSC_CRYPTO);
CY_ASSERT(NULL != obj&&obj->resource.type != CYHAL_RSC_CRYPTO);
_cyhal_crc_calc_free(obj->base);
if (obj->resource.type != CYHAL_RSC_INVALID)
{