# HG changeset patch # User Will Thompson # Date 1227269551 0 # Node ID 7cf760f3560ef0e76b926b01af9d7328d1d87683 # Parent 88955b9181972159f7a01f5bee0471e1e5169a59 Don't try to free NULL xmlnodes stolen by jabber-receiving-xmlnode handlers Handlers get a (xmlnode **) that they're meant to set to NULL if they steal the node for their own nefarious purposes, signalling to the prpl that it should forget about that node. But the prpl still tried to free the xmlnode* even if it had been NULLified, triggering g_return_if_fail warnings. Fixes the issue discussed by Arne Knig in http://pidgin.im/pipermail/devel/2008-November/007035.html and the following messages. diff -r 88955b918197 -r 7cf760f3560e libpurple/protocols/jabber/parser.c --- a/libpurple/protocols/jabber/parser.c Wed Nov 19 03:08:57 2008 +0000 +++ b/libpurple/protocols/jabber/parser.c Fri Nov 21 12:12:31 2008 +0000 @@ -114,7 +114,8 @@ xmlnode *packet = js->current; js->current = NULL; jabber_process_packet(js, &packet); - xmlnode_free(packet); + if (packet != NULL) + xmlnode_free(packet); } }