Fix a use after free that scanbuild found

Review Request #702 — Created June 2, 2021 and submitted — Latest diff uploaded

Information

pidgin/pidgin
release-2.x.y
48e2130fc9cc

Reviewers

Fix a use after free that scanbuild found

Verified the erros were no longer detected by scanbuild.