pidgin/pidgin

Fix leak that may occur when xmlnode_from_str fails
release-2.x.y
2021-09-13, Elliott Sales de Andrade
59a77978ca08
Fix leak that may occur when xmlnode_from_str fails

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

Testing Done:
Ran the reproducer testcase on `fuzz_xml`

Reviewed at https://reviews.imfreedom.org/r/911/
/** @page dbus-server-signals DBus Server Signals
@signals
@signal dbus-method-called
@signal dbus-introspect
@endsignals
@see dbus-server.h
<hr>
@signaldef dbus-method-called
@signalproto
gboolean (*dbus_method_called)(DBusConnection *connection,
DBusMessage *message);
@endsignalproto
@signaldesc
Emitted when a dbus method is going to be called.
@param connection The DBus connection.
@param message The DBus message.
@return TRUE if signal handler handled the method. ???
@endsignaldef
@signaldef dbus-introspect
@signalproto
void (*dbus_introspect)(GList **bidings_list);
@endsignalproto
@signaldesc
???
@param bindings_list ???
@endsignaldef
*/
// vim: syntax=c.doxygen tw=75 et