Mercurial > pidgin.yaz
changeset 20941:65d19253f746
merge of '4d5bbc54236419e777e3df044678b798605409bf'
and 'a3511433f0830f88e2e470b22fd2c706e2aa7713'
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Mon, 15 Oct 2007 01:44:52 +0000 |
parents | d1695d02c498 (current diff) 1d9d5de48b9e (diff) |
children | 37f3c1023a68 |
files | |
diffstat | 6 files changed, 26 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/prefs.c Mon Oct 15 00:47:48 2007 +0000 +++ b/libpurple/prefs.c Mon Oct 15 01:44:52 2007 +0000 @@ -297,6 +297,7 @@ g_filename_from_utf8(pref_value, -1, NULL, NULL, NULL)); } } + g_string_free(pref_name_full, TRUE); } else { char *decoded;
--- a/libpurple/protocols/msn/httpconn.c Mon Oct 15 00:47:48 2007 +0000 +++ b/libpurple/protocols/msn/httpconn.c Mon Oct 15 01:44:52 2007 +0000 @@ -169,7 +169,7 @@ /* Now we should be able to process the data. */ if ((s = purple_strcasestr(header, "X-MSN-Messenger: ")) != NULL) { - char *full_session_id, *gw_ip, *session_action; + gchar *full_session_id = NULL, *gw_ip = NULL, *session_action = NULL; char *t, *session_id; char **elems, **cur, **tokens; @@ -196,13 +196,16 @@ { tokens = g_strsplit(*cur, "=", 2); - if (strcmp(tokens[0], "SessionID") == 0) + if (strcmp(tokens[0], "SessionID") == 0) { + g_free(full_session_id); full_session_id = tokens[1]; - else if (strcmp(tokens[0], "GW-IP") == 0) + } else if (strcmp(tokens[0], "GW-IP") == 0) { + g_free(gw_ip); gw_ip = tokens[1]; - else if (strcmp(tokens[0], "Session") == 0) + } else if (strcmp(tokens[0], "Session") == 0) { + g_free(session_action); session_action = tokens[1]; - else + } else g_free(tokens[1]); g_free(tokens[0]);
--- a/libpurple/protocols/msn/msg.c Mon Oct 15 00:47:48 2007 +0000 +++ b/libpurple/protocols/msn/msg.c Mon Oct 15 01:44:52 2007 +0000 @@ -664,10 +664,11 @@ tokens = g_strsplit(*cur, ": ", 2); - if (tokens[0] != NULL && tokens[1] != NULL) + if (tokens[0] != NULL && tokens[1] != NULL) { g_hash_table_insert(table, tokens[0], tokens[1]); - - g_free(tokens); + g_free(tokens); + } else + g_strfreev(tokens); } g_strfreev(elems);
--- a/libpurple/protocols/msn/notification.c Mon Oct 15 00:47:48 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Mon Oct 15 01:44:52 2007 +0000 @@ -262,14 +262,15 @@ for (cur = elems; *cur != NULL; cur++) { tokens = g_strsplit(*cur, "=", 2); - if(tokens[0]&&tokens[1]) + if(tokens[0] && tokens[1]) { purple_debug_info("MSNP14","challenge %p,key:%s,value:%s\n", session->nexus->challenge_data,tokens[0],tokens[1]); g_hash_table_insert(session->nexus->challenge_data, tokens[0], tokens[1]); - } - /* Don't free each of the tokens, only the array. */ - g_free(tokens); + /* Don't free each of the tokens, only the array. */ + g_free(tokens); + } else + g_strfreev(tokens); } g_strfreev(elems); @@ -735,7 +736,7 @@ msn_cmdproc_send_trans(cmdproc, trans); g_free(payload); - g_free(tokens); + g_strfreev(tokens); } static void
--- a/libpurple/protocols/oscar/oscar.c Mon Oct 15 00:47:48 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Mon Oct 15 01:44:52 2007 +0000 @@ -5006,6 +5006,7 @@ g = purple_group_new(gname_utf8); purple_blist_add_group(g, NULL); } + g_free(gname_utf8); } break; case 0x0002: { /* Permit buddy */
--- a/pidgin/gtkutils.c Mon Oct 15 00:47:48 2007 +0000 +++ b/pidgin/gtkutils.c Mon Oct 15 01:44:52 2007 +0000 @@ -850,16 +850,14 @@ gboolean pidgin_check_if_dir(const char *path, GtkFileSelection *filesel) { - char *dirname; + char *dirname = NULL; if (g_file_test(path, G_FILE_TEST_IS_DIR)) { /* append a / if needed */ if (path[strlen(path) - 1] != G_DIR_SEPARATOR) { dirname = g_strconcat(path, G_DIR_SEPARATOR_S, NULL); - } else { - dirname = g_strdup(path); } - gtk_file_selection_set_filename(filesel, dirname); + gtk_file_selection_set_filename(filesel, (dirname != NULL) ? dirname : path); g_free(dirname); return TRUE; } @@ -1178,14 +1176,15 @@ label = gtk_widget_get_accessible (l); /* Make sure mnemonics work */ - gtk_label_set_mnemonic_widget(GTK_LABEL(l), w); - + gtk_label_set_mnemonic_widget(GTK_LABEL(l), w); + /* Create the labeled-by relation */ set = atk_object_ref_relation_set (acc); rel_obj[0] = label; relation = atk_relation_new (rel_obj, 1, ATK_RELATION_LABELLED_BY); atk_relation_set_add (set, relation); g_object_unref (relation); + g_object_unref(set); /* Create the label-for relation */ set = atk_object_ref_relation_set (label); @@ -1193,6 +1192,7 @@ relation = atk_relation_new (rel_obj, 1, ATK_RELATION_LABEL_FOR); atk_relation_set_add (set, relation); g_object_unref (relation); + g_object_unref(set); } void