diff options
author | Paul Aurich <darkrain42@pidgin.im> | 2009-04-12 22:42:38 +0000 |
---|---|---|
committer | Paul Aurich <darkrain42@pidgin.im> | 2009-04-12 22:42:38 +0000 |
commit | b66b7bb765ae120d8460d87202efb9dda997db68 (patch) | |
tree | 1e93b1fe34169423383709ec45012c7c8df1c5e4 | |
parent | d14b5c66c025e6cd061e765a4f057ce190ee176d (diff) | |
parent | a7fe39b754efcb6cb00dcd47b8fc2e0fa1ff7ec9 (diff) | |
download | pidgin-b66b7bb765ae120d8460d87202efb9dda997db68.tar.gz |
merge of 'd3d111b75dcf25cde62c752ed6a321d9b8935f07'
and '67cb46e32f77cefdf34d23ee87bc9644541e7fa8'
-rw-r--r-- | libpurple/blist.c | 1 | ||||
-rw-r--r-- | libpurple/network.c | 9 | ||||
-rw-r--r-- | libpurple/protocols/jabber/google.c | 7 | ||||
-rw-r--r-- | libpurple/protocols/yahoo/yahoo_filexfer.c | 14 | ||||
-rw-r--r-- | libpurple/stun.c | 6 | ||||
-rw-r--r-- | pidgin/gtkblist-theme-loader.c | 6 | ||||
-rw-r--r-- | pidgin/gtkblist-theme.c | 9 |
7 files changed, 40 insertions, 12 deletions
diff --git a/libpurple/blist.c b/libpurple/blist.c index c12edbfff8..1aacc59a3a 100644 --- a/libpurple/blist.c +++ b/libpurple/blist.c @@ -1582,6 +1582,7 @@ void purple_contact_destroy(PurpleContact *contact) { g_hash_table_destroy(contact->node.settings); + g_free(contact->alias); PURPLE_DBUS_UNREGISTER_POINTER(contact); g_free(contact); } diff --git a/libpurple/network.c b/libpurple/network.c index 3fec1551e6..fb008f886f 100644 --- a/libpurple/network.c +++ b/libpurple/network.c @@ -825,8 +825,13 @@ purple_network_ip_lookup_cb(GSList *hosts, gpointer data, *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 diff --git a/libpurple/protocols/jabber/google.c b/libpurple/protocols/jabber/google.c index 7796a72391..83791c6a6d 100644 --- a/libpurple/protocols/jabber/google.c +++ b/libpurple/protocols/jabber/google.c @@ -1156,7 +1156,12 @@ jabber_google_stun_lookup_cb(GSList *hosts, gpointer data, } } - 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 diff --git a/libpurple/protocols/yahoo/yahoo_filexfer.c b/libpurple/protocols/yahoo/yahoo_filexfer.c index e5d4ef4c39..fff238f48a 100644 --- a/libpurple/protocols/yahoo/yahoo_filexfer.c +++ b/libpurple/protocols/yahoo/yahoo_filexfer.c @@ -1029,12 +1029,7 @@ static void yahoo_xfer_dns_connected_15(GSList *hosts, gpointer data, const char 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 @@ static void yahoo_xfer_dns_connected_15(GSList *hosts, gpointer data, const char 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)); diff --git a/libpurple/stun.c b/libpurple/stun.c index 9e39601241..8aad4cfdd3 100644 --- a/libpurple/stun.c +++ b/libpurple/stun.c @@ -341,6 +341,12 @@ static void hbn_cb(GSList *hosts, gpointer data, const char *error_message) { } 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(); diff --git a/pidgin/gtkblist-theme-loader.c b/pidgin/gtkblist-theme-loader.c index 8571a53f37..84a8583ef3 100644 --- a/pidgin/gtkblist-theme-loader.c +++ b/pidgin/gtkblist-theme-loader.c @@ -172,15 +172,15 @@ pidgin_blist_loader_build(const gchar *dir) 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))) { diff --git a/pidgin/gtkblist-theme.c b/pidgin/gtkblist-theme.c index 86ab512420..15320304a9 100644 --- a/pidgin/gtkblist-theme.c +++ b/pidgin/gtkblist-theme.c @@ -245,17 +245,22 @@ pidgin_blist_theme_finalize(GObject *obj) 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 @@ pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, GdkColor *color priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme)); + g_free(priv->bgcolor); priv->bgcolor = color; } @@ -626,6 +632,7 @@ pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, GdkCol priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme)); + g_free(priv->expanded_color); priv->expanded_color = color; } @@ -651,6 +658,7 @@ pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, GdkCo priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme)); + g_free(priv->collapsed_color); priv->collapsed_color = color; } @@ -676,6 +684,7 @@ pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, GdkColor *color) priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme)); + g_free(priv->contact_color); priv->contact_color = color; } |