I think this might be a leak. But probably only if the server changed

Sat, 14 Aug 2010 03:39:03 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Sat, 14 Aug 2010 03:39:03 +0000
changeset 30624
f8210e900ad9
parent 30623
d0368101bd0d
child 30625
5b4b766c27d9

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

libpurple/protocols/msn/contact.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/msn/contact.c	Wed Aug 11 04:37:49 2010 +0000
+++ b/libpurple/protocols/msn/contact.c	Sat Aug 14 03:39:03 2010 +0000
@@ -684,20 +684,20 @@
 		xmlnode *annotation;
 		MsnUser *user;
 
+		g_free(passport);
+		g_free(Name);
+		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;
 
-		g_free(passport);
-		g_free(Name);
-		g_free(alias);
-		g_free(uid);
-		g_free(type);
-		g_free(mobile_number);
-		passport = Name = uid = type = mobile_number = alias = NULL;
-		mobile = FALSE;
-
 		uid = xmlnode_get_data(contactId);
 		type = xmlnode_get_data(contactType);
 
@@ -836,6 +836,7 @@
 	g_free(uid);
 	g_free(type);
 	g_free(mobile_number);
+	g_free(alias);
 }
 
 static gboolean

mercurial