pidgin: 6ae822f4: I think this might be a leak. But probab...

qulogic at pidgin.im qulogic at pidgin.im
Sat Aug 14 02:25:49 EDT 2010


----------------------------------------------------------------------
Revision: 6ae822f48b2ae071757c1243f097973203c6f07f
Parent:   e1bcb2fd07210e956822b215bb4f2d0f73e661f8
Author:   qulogic at pidgin.im
Date:     08/13/10 23:39:03
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6ae822f48b2ae071757c1243f097973203c6f07f

Changelog: 

I think this might be a leak. But probably only if the server changed
what it was sending.

Changes against parent e1bcb2fd07210e956822b215bb4f2d0f73e661f8

  patched  libpurple/protocols/msn/contact.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c	b1c3a8db417970be400ea7fe210907050810ef9f
+++ libpurple/protocols/msn/contact.c	c3364b30b4e1a41ced52836a5bc5790bb230c892
@@ -684,20 +684,20 @@ msn_parse_addressbook_contacts(MsnSessio
 		xmlnode *annotation;
 		MsnUser *user;
 
-		if (!(contactId = xmlnode_get_child(contactNode,"contactId"))
-				|| !(contactInfo = xmlnode_get_child(contactNode, "contactInfo"))
-				|| !(contactType = xmlnode_get_child(contactInfo, "contactType")))
-			continue;
-
 		g_free(passport);
 		g_free(Name);
-		g_free(alias);
 		g_free(uid);
 		g_free(type);
 		g_free(mobile_number);
+		g_free(alias);
 		passport = Name = uid = type = mobile_number = alias = NULL;
 		mobile = FALSE;
 
+		if (!(contactId = xmlnode_get_child(contactNode,"contactId"))
+				|| !(contactInfo = xmlnode_get_child(contactNode, "contactInfo"))
+				|| !(contactType = xmlnode_get_child(contactInfo, "contactType")))
+			continue;
+
 		uid = xmlnode_get_data(contactId);
 		type = xmlnode_get_data(contactType);
 
@@ -836,6 +836,7 @@ msn_parse_addressbook_contacts(MsnSessio
 	g_free(uid);
 	g_free(type);
 	g_free(mobile_number);
+	g_free(alias);
 }
 
 static gboolean


More information about the Commits mailing list