From 70555d532df7ab185c41d5589b2aa2b77f18ceca Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 15 Nov 2018 09:18:18 +0100 Subject: mutex: Avoid NULL pointer access in panic() --- rtemsbsd/include/machine/rtems-bsd-muteximpl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) { -- cgit v1.2.3