mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-21 04:14:26 +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
|
||||
)
|
||||
{
|
||||
if ( !attr )
|
||||
if ( !attr || !attr->is_initialized )
|
||||
return EINVAL;
|
||||
|
||||
switch ( protocol ) {
|
||||
|
||||
@@ -506,7 +506,7 @@ int pthread_mutexattr_setprotocol(
|
||||
int protocol
|
||||
)
|
||||
{
|
||||
if ( !attr )
|
||||
if ( !attr || !attr->is_initialized )
|
||||
return EINVAL;
|
||||
|
||||
switch ( protocol ) {
|
||||
|
||||
Reference in New Issue
Block a user