forked from Imagelibrary/rtems
rtems: Fix rtems_object_set_name()
Return RTEMS_NO_MEMORY if there is not memory available to duplicate the name.
This commit is contained in:
@@ -37,6 +37,7 @@ rtems_status_code rtems_object_set_name(
|
|||||||
Objects_Information *information;
|
Objects_Information *information;
|
||||||
Objects_Control *the_object;
|
Objects_Control *the_object;
|
||||||
Objects_Id tmpId;
|
Objects_Id tmpId;
|
||||||
|
Status_Control status;
|
||||||
|
|
||||||
if ( !name )
|
if ( !name )
|
||||||
return RTEMS_INVALID_ADDRESS;
|
return RTEMS_INVALID_ADDRESS;
|
||||||
@@ -55,7 +56,7 @@ rtems_status_code rtems_object_set_name(
|
|||||||
return RTEMS_INVALID_ID;
|
return RTEMS_INVALID_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
_Objects_Set_name( information, the_object, name );
|
status = _Objects_Set_name( information, the_object, name );
|
||||||
_Objects_Allocator_unlock();
|
_Objects_Allocator_unlock();
|
||||||
return RTEMS_SUCCESSFUL;
|
return STATUS_GET_CLASSIC( status );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user