Fix memory leak if a DNS request fails to be made.

A symptom of this is a "can't issue DNS request" warning in
reporter.log. (Doesn't look like this should be a typical thing
that happens in most environments).