Fix leak that may occur when xmlnode_from_str fails

Review Request #911 — Created Sept. 9, 2021 and submitted — Latest diff uploaded

Information

pidgin/pidgin
release-2.x.y

Reviewers

The failure may occur any time in the middle of parsing, and xpd->current may
not actually be pointing to the root of the parsed tree. Thus we need to walk
back up before freeing the xmlnode.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34988

Ran the reproducer testcase on fuzz_xml

Commits

Files