Fix some issues scanbuild found in prefs.c

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

Information

pidgin/pidgin
release-2.x.y
6dbb62619d96

Reviewers

Fix some issues scanbuild found in prefs.c

Verified scanbuild no longer detected the errors.