Skip to content

Commit 666ebe3

Browse files
Ron EldorRon Eldor
authored andcommitted
Change the terminate limit check
Check for counter to be `< 1` instead of `<= 0` before terminating.
1 parent 1f5cee9 commit 666ebe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/mbedtls/platform/src/platform_alt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void mbedtls_platform_teardown( mbedtls_platform_context *obsolete_ctx )
4242
{
4343

4444
core_util_atomic_decr_u32( ( volatile uint32_t * )&ctx.reference_count, 1 );
45-
if( ctx.reference_count <= 0 )
45+
if( ctx.reference_count < 1 )
4646
{
4747
/* call platform specific code to terminate crypto driver */
4848
crypto_platform_terminate( &ctx.platform_impl_ctx );

0 commit comments

Comments
 (0)