Fix some issues scanbuild found in our dns handling code

Review Request #694 — Created June 1, 2021 and submitted — Latest diff uploaded

Information

pidgin/pidgin
release-2.x.y
37da43c585ff

Reviewers

Fix some issues scanbuild found in our dns handling code

Verified scanbuild no longer detected the errors.