summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Oguin <josh.oguin@oarcorp.com>2014-11-19 14:47:57 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-11-26 07:51:59 -0600
commitc562d0c9b0118e1154c290dc83397c0828a7de48 (patch)
tree4e398a5d9ff044c9f0acf1ef916398ffc6cd6db8
parentchainimpl.h: Add _Assert() to _Chain_Initialize_empty() (diff)
downloadrtems-c562d0c9b0118e1154c290dc83397c0828a7de48.tar.bz2
objectimpl.h: Add _Assert() to _Objects_Invalidate_Id()
CodeSonar flagged this as a possible NULL deference. This should never occur but adding the _Assert() ensures we are guarding against that.
-rw-r--r--cpukit/score/include/rtems/score/objectimpl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h
index 4e626ae663..2928effb57 100644
--- a/cpukit/score/include/rtems/score/objectimpl.h
+++ b/cpukit/score/include/rtems/score/objectimpl.h
@@ -875,6 +875,9 @@ RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Control *the_object
)
{
+ _Assert( information != NULL );
+ _Assert( the_object != NULL );
+
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
@@ -896,6 +899,9 @@ RTEMS_INLINE_ROUTINE void _Objects_Open(
Objects_Name name
)
{
+ _Assert( information != NULL );
+ _Assert( the_object != NULL );
+
the_object->name = name;
_Objects_Set_local_object(