Fix more Coverity-reported issues (introduced by internal error audit).

Mem leaks and a null pointer deref (not actually expected to occur
unless already in one of the the odd states that warrants an internal
warning/error).

Also dead code.