diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-23 08:19:43 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-23 08:23:59 +0200 |
commit | 03747b508779ccddef3b7e39da825a7037fa8453 (patch) | |
tree | b1810115af29294097e26b4a9be42b2e4ed8d072 /cpukit/rtems | |
parent | bsps/beagle: Refactored i2c driver (diff) | |
download | rtems-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.c | 4 |
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 ); } |