kdc-heimdal: avoid NULL dereference when task is NULL
kdc_post_fork() may be called with NULL task pointer leading to a
call of task_server_terminate() with NULL pointer, where it will
be dereferenced.
Add an explicit NULL check and instead of attempting to terminate
a NULL task, log the error and return.
Pair-Programmed-With: Timofei Fedotov <sovtouch@altlinux.org> Signed-off-by: Daniil Sarafannikov <sarafannikovda@sgu.ru> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Jun 19 08:22:25 UTC 2026 on atb-devel-224