# HG changeset patch # User Sadrul Habib Chowdhury # Date 1191565453 0 # Node ID 996cc19d1f7e7e8628df3b52439680e68825ec7a # Parent 6da14d53823137764d435557d69784ed6a17bfaf# Parent e587a7be29161b96012a984521a9a39d8886e0d4 merge of '077670cb60ab530215573771befe704110370be0' and '246d6966366baf94241a3df262da58486a8a7835' diff -r e587a7be2916 -r 996cc19d1f7e libpurple/dnsquery.c --- a/libpurple/dnsquery.c Fri Oct 05 06:13:44 2007 +0000 +++ b/libpurple/dnsquery.c Fri Oct 05 06:24:13 2007 +0000 @@ -637,9 +637,10 @@ static gboolean dns_main_thread_cb(gpointer data) { - PurpleDnsQueryData *query_data; + PurpleDnsQueryData *query_data = data; - query_data = data; + /* We're done, so purple_dnsquery_destroy() shouldn't think it is canceling an in-progress lookup */ + query_data->resolver = NULL; if (query_data->error_message != NULL) purple_dnsquery_failed(query_data, query_data->error_message); @@ -713,7 +714,7 @@ #endif /* back to main thread */ - g_idle_add(dns_main_thread_cb, query_data); + purple_timeout_add(0, dns_main_thread_cb, query_data); return 0; } @@ -780,14 +781,12 @@ purple_debug_info("dnsquery", "Performing DNS lookup for %s\n", hostname); - query_data = g_new(PurpleDnsQueryData, 1); + query_data = g_new0(PurpleDnsQueryData, 1); query_data->hostname = g_strdup(hostname); g_strstrip(query_data->hostname); query_data->port = port; query_data->callback = callback; query_data->data = data; - query_data->error_message = NULL; - query_data->hosts = NULL; if (strlen(query_data->hostname) == 0) { diff -r e587a7be2916 -r 996cc19d1f7e libpurple/plugins/log_reader.c --- a/libpurple/plugins/log_reader.c Fri Oct 05 06:13:44 2007 +0000 +++ b/libpurple/plugins/log_reader.c Fri Oct 05 06:24:13 2007 +0000 @@ -2271,6 +2271,7 @@ "Error reading talk.ini\n"); if (error) g_error_free(error); + g_free(path); } else { char *line = contents; while (*contents) { @@ -2318,6 +2319,9 @@ "default", "logs", NULL); #endif + /*XXX: Why do we even bother allocating it ? */ + g_free(path); + /* Add QIP log directory preference. */ purple_prefs_add_none("/plugins/core/log_reader/qip"); diff -r e587a7be2916 -r 996cc19d1f7e libpurple/protocols/jabber/google.c --- a/libpurple/protocols/jabber/google.c Fri Oct 05 06:13:44 2007 +0000 +++ b/libpurple/protocols/jabber/google.c Fri Oct 05 06:24:13 2007 +0000 @@ -231,7 +231,7 @@ const char *jid = xmlnode_get_attrib(item, "jid"); gboolean on_block_list = FALSE; - char *jid_norm = g_strdup(jabber_normalize(account, jid)); + char *jid_norm; const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster"); const char *subscription = xmlnode_get_attrib(item, "subscription"); @@ -243,6 +243,8 @@ return FALSE; } + jid_norm = g_strdup(jabber_normalize(account, jid)); + while (list) { if (!strcmp(jid_norm, (char*)list->data)) { on_block_list = TRUE; diff -r e587a7be2916 -r 996cc19d1f7e libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Fri Oct 05 06:13:44 2007 +0000 +++ b/libpurple/protocols/jabber/presence.c Fri Oct 05 06:24:13 2007 +0000 @@ -378,7 +378,8 @@ break; } } - g_free(user_data); + g_free(userdata->from); + g_free(userdata); } void jabber_presence_parse(JabberStream *js, xmlnode *packet) diff -r e587a7be2916 -r 996cc19d1f7e pidgin/plugins/ticker/ticker.c --- a/pidgin/plugins/ticker/ticker.c Fri Oct 05 06:13:44 2007 +0000 +++ b/pidgin/plugins/ticker/ticker.c Fri Oct 05 06:24:13 2007 +0000 @@ -124,8 +124,10 @@ static gboolean buddy_ticker_set_pixmap_cb(gpointer data) { TickerData *td = data; - buddy_ticker_update_contact(td->contact); - td->timeout = 0; + if (g_list_find(tickerbuds, td) != NULL) { + buddy_ticker_update_contact(td->contact); + td->timeout = 0; + } return FALSE; }