From c7a9c6675e9d3c3a3224bbca8111eb46c3fcf966 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Aug 1996 18:06:27 +0000 Subject: _POSIX_Mutex_Get: made null id an error --- cpukit/posix/inline/rtems/posix/mutex.inl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cpukit/posix/inline') diff --git a/cpukit/posix/inline/rtems/posix/mutex.inl b/cpukit/posix/inline/rtems/posix/mutex.inl index ecbf039a45..baeb960858 100644 --- a/cpukit/posix/inline/rtems/posix/mutex.inl +++ b/cpukit/posix/inline/rtems/posix/mutex.inl @@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get ( { int status; + if ( !id ) { + *location = OBJECTS_ERROR; + return (POSIX_Mutex_Control *) 0; + } + if ( *id == PTHREAD_MUTEX_INITIALIZER ) { /* * Do an "auto-create" here. -- cgit v1.2.3