]> git.ipfire.org Git - thirdparty/unbound.git/commit
daemon: fix DEREF_AFTER_NULL.EX.COND on worker_init (#1467)
authorPetr Vaganov <petrvaganoff@gmail.com>
Fri, 26 Jun 2026 11:42:29 +0000 (18:42 +0700)
committerGitHub <noreply@github.com>
Fri, 26 Jun 2026 11:42:29 +0000 (13:42 +0200)
commit6cbcea3ac75e8bd5e84459013dafff7e5b9db7e3
treeb4110a35c748336ff40f882386c67b9a74c1bf64
parent65e23d4b6fec6d99afab75fa208569b96e804e35
daemon: fix DEREF_AFTER_NULL.EX.COND on worker_init (#1467)

Found by the static analyzer Svace (ISP RAS).

After having been compared to a NULL value at worker.c:2216,
pointer 'worker->stat_timer' is passed in call to function
'worker_restart_timer' at worker.c:2319,where it is
dereferenced at worker.c:2029.

Fix that stat_timer creation failure in worker_init does
not continue with a NULL timer that causes a crash later.

Signed-off-by: Petr Vaganov <petrvaganoff@gmail.com>
daemon/worker.c