forked from Imagelibrary/rtems
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.
This commit is contained in:
committed by
Joel Sherrill
parent
fbafb8f249
commit
c562d0c9b0
@@ -875,6 +875,9 @@ RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
|
|||||||
Objects_Control *the_object
|
Objects_Control *the_object
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
_Assert( information != NULL );
|
||||||
|
_Assert( the_object != NULL );
|
||||||
|
|
||||||
_Objects_Set_local_object(
|
_Objects_Set_local_object(
|
||||||
information,
|
information,
|
||||||
_Objects_Get_index( the_object->id ),
|
_Objects_Get_index( the_object->id ),
|
||||||
@@ -896,6 +899,9 @@ RTEMS_INLINE_ROUTINE void _Objects_Open(
|
|||||||
Objects_Name name
|
Objects_Name name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
_Assert( information != NULL );
|
||||||
|
_Assert( the_object != NULL );
|
||||||
|
|
||||||
the_object->name = name;
|
the_object->name = name;
|
||||||
|
|
||||||
_Objects_Set_local_object(
|
_Objects_Set_local_object(
|
||||||
|
|||||||
Reference in New Issue
Block a user