diff src/protocols/jabber/presence.c @ 7310:dd4b4a187171

[gaim-migrate @ 7894] assorted jabber tweaks committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 21 Oct 2003 17:18:46 +0000
parents f946af3b0039
children 578f3ae5a8c0
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c	Tue Oct 21 16:34:12 2003 +0000
+++ b/src/protocols/jabber/presence.c	Tue Oct 21 17:18:46 2003 +0000
@@ -209,6 +209,9 @@
 		}
 	}
 
+	if(!(jid = jabber_id_new(from)))
+		return;
+
 	for(y = packet->child; y; y = y->next) {
 		if(y->type != NODE_TYPE_TAG)
 			continue;
@@ -232,7 +235,6 @@
 		}
 	}
 
-	jid = jabber_id_new(from);
 
 	if((chat = jabber_chat_find(js, jid->node, jid->domain))) {
 		static int i = 0;
@@ -262,6 +264,7 @@
 			g_free(buf);
 
 			jabber_chat_destroy(chat);
+			jabber_id_free(jid);
 			return;
 		}