summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-23 08:19:43 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-23 08:23:59 +0200
commit03747b508779ccddef3b7e39da825a7037fa8453 (patch)
treeb1810115af29294097e26b4a9be42b2e4ed8d072 /cpukit/rtems
parentd75b29d95e71f04a71e375750c1a02b3bacd533f (diff)
downloadrtems-03747b508779ccddef3b7e39da825a7037fa8453.tar.bz2
rtems: Check for NULL config in msgq construct
Since there are already excessive NULL pointer checks in the Classic API, do this also in rtems_message_queue_construct(). Update #4007.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/msgqconstruct.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/rtems/src/msgqconstruct.c b/cpukit/rtems/src/msgqconstruct.c
index 6cada4c570..6af57454cc 100644
--- a/cpukit/rtems/src/msgqconstruct.c
+++ b/cpukit/rtems/src/msgqconstruct.c
@@ -50,6 +50,10 @@ rtems_status_code rtems_message_queue_construct(
rtems_id *id
)
{
+ if ( config == NULL ) {
+ return RTEMS_INVALID_ADDRESS;
+ }
+
return _Message_queue_Create( config, id, _Message_queue_Get_buffers );
}