mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-21 13:01:58 +08:00
pthread_mutexattr_getprotocol: added check for attribute structure being
initialized
This commit is contained in:
@@ -506,7 +506,7 @@ int pthread_mutexattr_setprotocol(
|
|||||||
int protocol
|
int protocol
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
switch ( protocol ) {
|
switch ( protocol ) {
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ int pthread_mutexattr_setprotocol(
|
|||||||
int protocol
|
int protocol
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
switch ( protocol ) {
|
switch ( protocol ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user