summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-15 09:18:18 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-15 09:18:48 +0100
commit70555d532df7ab185c41d5589b2aa2b77f18ceca (patch)
tree9cac3626dcaf2d03b64503bebfc71445bc2d228f
parentFix locking issue in epoch_watchdog() (diff)
downloadrtems-libbsd-70555d532df7ab185c41d5589b2aa2b77f18ceca.tar.bz2
mutex: Avoid NULL pointer access in panic()
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-muteximpl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
index c947e2ba..b362e524 100644
--- a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
+++ b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
@@ -201,7 +201,8 @@ rtems_bsd_mutex_unlock(rtems_bsd_mutex *m)
rtems_bsd_mutex_release(m, isr_level, &queue_context);
panic("mutex unlock: %s: owner 0x%08" PRIx32
" != executing 0x%08" PRIx32 "\n", m->queue.Queue.name,
- owner->Object.id, executing->Object.id);
+ owner != NULL ? owner->Object.id : 0,
+ executing->Object.id);
}
if (__predict_true(nest_level == 0)) {