Fix some issues scan-build found in util.c

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

Information

pidgin/pidgin
release-2.x.y
f3ed9a227948

Reviewers

Fix some issues scan-build found in util.c

Ran scanbuild and verified the bugs we fixed.