Fix some double frees that scanbuild found

Review Request #708 — Created June 2, 2021 and submitted

Information

pidgin/pidgin
release-2.x.y
4438bf4b23e4

Reviewers

Fix some double frees that scanbuild found

Verified scanbuild no longer detected the errors.