changeset 24480:7cf760f3560e

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.
author Will Thompson <will.thompson@collabora.co.uk>
date Fri, 21 Nov 2008 12:12:31 +0000
parents 88955b918197
children f387ded6f5ed
files libpurple/protocols/jabber/parser.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
 	}
 }