changeset 26562:16e2f915e3a0

merge of '331dd310d018e9ecbd997e8af14ebcfc79277318' and 'e3c2e41946f35630cb1b6b8bd96de60cce3c9f40'
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Apr 2009 22:42:38 +0000
parents 0a5823a58279 (current diff) 842b3034d4c6 (diff)
children 75b473f216f2 6559bf971fcd
files
diffstat 7 files changed, 40 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/libpurple/blist.c	Sun Apr 12 22:42:38 2009 +0000
@@ -1582,6 +1582,7 @@
 purple_contact_destroy(PurpleContact *contact)
 {
 	g_hash_table_destroy(contact->node.settings);
+	g_free(contact->alias);
 	PURPLE_DBUS_UNREGISTER_POINTER(contact);
 	g_free(contact);
 }
--- a/libpurple/network.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/libpurple/network.c	Sun Apr 12 22:42:38 2009 +0000
@@ -825,8 +825,13 @@
 		*ip = g_strdup(dst);
 		purple_debug_info("network", "set IP address: %s\n", *ip);
 	}
-	
-	g_slist_free(hosts);
+
+	while (hosts != NULL) {
+		hosts = g_slist_delete_link(hosts, hosts);
+		/* Free the address */
+		g_free(hosts->data);
+		hosts = g_slist_delete_link(hosts, hosts);
+	}
 }
 
 void
--- a/libpurple/protocols/jabber/google.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Sun Apr 12 22:42:38 2009 +0000
@@ -1156,7 +1156,12 @@
 		}
 	}
 
-	g_slist_free(hosts);
+	while (hosts != NULL) {
+		hosts = g_slist_delete_link(hosts, hosts);
+		/* Free the address */
+		g_free(hosts->data);
+		hosts = g_slist_delete_link(hosts, hosts);
+	}
 }
 
 static void
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Sun Apr 12 22:42:38 2009 +0000
@@ -1029,12 +1029,7 @@
 		xd->port = YAHOO_XFER_RELAY_PORT;
 
 	url = g_strdup_printf("%ld.%ld.%ld.%ld", d, c, b, a);
-	if (!purple_url_parse(url, &(xd->host), &(xd->port), &(xd->path), NULL, NULL)) {
-		purple_xfer_cancel_remote(xfer);
-		g_free(url);
-		return;
-	}
-	g_free(url);
+
 	/* Free the address... */
 	g_free(hosts->data);
 	hosts = g_slist_remove(hosts, hosts->data);
@@ -1048,6 +1043,13 @@
 		hosts = g_slist_remove(hosts, hosts->data);
 	}
 
+	if (!purple_url_parse(url, &(xd->host), &(xd->port), &(xd->path), NULL, NULL)) {
+		purple_xfer_cancel_remote(xfer);
+		g_free(url);
+		return;
+	}
+	g_free(url);
+
 	pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_INFO_15, YAHOO_STATUS_AVAILABLE, yd->session_id);
 	filename = g_path_get_basename(purple_xfer_get_local_filename(xfer));
 
--- a/libpurple/stun.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/libpurple/stun.c	Sun Apr 12 22:42:38 2009 +0000
@@ -341,6 +341,12 @@
 	}
 
 	if (!purple_network_listen_range(12108, 12208, SOCK_DGRAM, hbn_listen_cb, hosts)) {
+		while(hosts) {
+			hosts = g_slist_remove(hosts, hosts->data);
+			g_free(hosts->data);
+			hosts = g_slist_remove(hosts, hosts->data);
+		}
+
 		nattype.status = PURPLE_STUN_STATUS_UNKNOWN;
 		nattype.lookup_time = time(NULL);
 		do_callbacks();
--- a/pidgin/gtkblist-theme-loader.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/pidgin/gtkblist-theme-loader.c	Sun Apr 12 22:42:38 2009 +0000
@@ -172,15 +172,15 @@
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "offline_text")) != NULL))) {
 		offline->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			online->color = g_strdup(temp);
-		else online->color = g_strdup(DEFAULT_TEXT_COLOR);
+			offline->color = g_strdup(temp);
+		else offline->color = g_strdup(DEFAULT_TEXT_COLOR);
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "idle_text")) != NULL))) {
 		idle->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
 			idle->color = g_strdup(temp);
-		else online->color = g_strdup(DEFAULT_TEXT_COLOR);
+		else idle->color = g_strdup(DEFAULT_TEXT_COLOR);
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "message_text")) != NULL))) {
--- a/pidgin/gtkblist-theme.c	Sun Apr 12 21:32:35 2009 +0000
+++ b/pidgin/gtkblist-theme.c	Sun Apr 12 22:42:38 2009 +0000
@@ -245,17 +245,22 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(obj);
 
 	/* Buddy List */
+	g_free(priv->bgcolor);
 	g_free(priv->layout);
 
 	/* Group */
+	g_free(priv->expanded_color);
 	free_font_and_color(priv->expanded);
+	g_free(priv->collapsed_color);
 	free_font_and_color(priv->collapsed);
 
 	/* Buddy */
+	g_free(priv->contact_color);
 	free_font_and_color(priv->contact);
 	free_font_and_color(priv->online);
 	free_font_and_color(priv->away);
 	free_font_and_color(priv->offline);
+	free_font_and_color(priv->idle);
 	free_font_and_color(priv->message);
 	free_font_and_color(priv->message_nick_said);
 	free_font_and_color(priv->status);
@@ -589,6 +594,7 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
+	g_free(priv->bgcolor);
 	priv->bgcolor = color;
 }
 
@@ -626,6 +632,7 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
+	g_free(priv->expanded_color);
 	priv->expanded_color = color;
 }
 
@@ -651,6 +658,7 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
+	g_free(priv->collapsed_color);
 	priv->collapsed_color = color;
 }
 
@@ -676,6 +684,7 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
+	g_free(priv->contact_color);
 	priv->contact_color = color;
 }