mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-01 22:24:55 +02:00
check before use daemon->shm_info (#1229)
fix core after the command `unbound-control stop unbound` fix:https://github.com/NLnetLabs/unbound/issues/1228 Signed-off-by: eaglegai <eaglegai@163.com>
This commit is contained in:
@@ -195,7 +195,7 @@ void shm_main_shutdown(struct daemon* daemon)
|
||||
{
|
||||
#ifdef HAVE_SHMGET
|
||||
/* web are OK, just disabled */
|
||||
if(!daemon->cfg->shm_enable)
|
||||
if(!daemon->cfg->shm_enable || !daemon->shm_info)
|
||||
return;
|
||||
|
||||
verbose(VERB_DETAIL, "SHM shutdown - KEY [%d] - ID CTL [%d] ARR [%d] - PTR CTL [%p] ARR [%p]",
|
||||
|
||||
Reference in New Issue
Block a user