Skip to content

Commit

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

fix:#1228

Signed-off-by: eaglegai <[email protected]>
  • Loading branch information
eaglegai authored Jan 21, 2025
1 parent f822042 commit 073c730
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 073c730

Please sign in to comment.