mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Check if logconfig is NULL before using it in isc_log_doit()
Check if 'lctx->logconfig' is NULL before using it in isc_log_doit(), because it's possible that isc_log_destroy() was already called, e.g. when a 'call_rcu' function wants to log a message during shutdown.
This commit is contained in:
parent
75021765f8
commit
656e04f48a
1 changed files with 3 additions and 0 deletions
|
|
@ -1511,6 +1511,9 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
|
|||
lctx->buffer[0] = '\0';
|
||||
|
||||
isc_logconfig_t *lcfg = rcu_dereference(lctx->logconfig);
|
||||
if (lcfg == NULL) {
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
category_channels = ISC_LIST_HEAD(lcfg->channellists[category->id]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue