dns.c: Avoid a null dereference on error.
local.c: avoid a NULL dereference on error.