libdmn: don't use 'name' until after checking it

(no real effect in practice, since gdnsd always sets it)
Make qa/scanbuild.sh work again

At least on F21 ...