Change the terminate limit check

Check for counter to be `< 1` instead of `<= 0` before terminating.
pull/7099/head
Ron Eldor 2018-08-30 13:51:58 +03:00
parent 1f5cee967d
commit 666ebe392a
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ void mbedtls_platform_teardown( mbedtls_platform_context *obsolete_ctx )
{
core_util_atomic_decr_u32( ( volatile uint32_t * )&ctx.reference_count, 1 );
if( ctx.reference_count <= 0 )
if( ctx.reference_count < 1 )
{
/* call platform specific code to terminate crypto driver */
crypto_platform_terminate( &ctx.platform_impl_ctx );