[rtems commit] score: Add an assert to _Workspace_Free()
Sebastian Huber
sebh at rtems.org
Sat Mar 27 18:34:52 UTC 2021
Module: rtems
Branch: master
Commit: 1e62e15f46283a3affb1e6dcceead0c382482287
Changeset: http://git.rtems.org/rtems/commit/?id=1e62e15f46283a3affb1e6dcceead0c382482287
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Sat Mar 27 18:08:13 2021 +0100
score: Add an assert to _Workspace_Free()
---
cpukit/score/src/wkspace.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index 3ca3c83..546847b 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -115,5 +115,9 @@ void *_Workspace_Allocate( size_t size )
void _Workspace_Free( void *block )
{
- _Heap_Free( &_Workspace_Area, block );
+ bool ok;
+
+ ok = _Heap_Free( &_Workspace_Area, block );
+ _Assert( ok );
+ (void) ok;
}
More information about the vc
mailing list