Skip to content

Commit

Permalink
check before use daemon->shm_info
Browse files Browse the repository at this point in the history
fix core after the command `unbound-control stop unbound`

fix:NLnetLabs#1228
Signed-off-by: eaglegai <[email protected]>
  • Loading branch information
eaglegai committed Jan 21, 2025
1 parent 5f58ced commit 0634c1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/shm_side/shm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]",
Expand Down

0 comments on commit 0634c1e

Please sign in to comment.