changeset 20794:366204358e93

merge of '2ed39e287c8bc0502ecaf3b390fc0441ab160a99' and '7c1e4d9a3444019b453af4bab1b27b9b3b63cb83'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 06 Oct 2007 04:08:16 +0000
parents 16d372f412e3 (diff) bbae118811a1 (current diff)
children 93674777d32f 97bda4a072d2 fdefa5eb46e2
files
diffstat 3 files changed, 22 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Sat Oct 06 04:06:30 2007 +0000
+++ b/libpurple/protocols/msn/contact.c	Sat Oct 06 04:08:16 2007 +0000
@@ -208,7 +208,7 @@
 
 /*get MSN member role utility*/
 static MsnListId
-msn_get_memberrole(char *role)
+msn_get_memberrole(const char *role)
 {
 	g_return_val_if_fail(role != NULL, 0);
 
@@ -532,8 +532,8 @@
 					}
 				}
 			}
-			g_free(typedata);	/* Free 'Type' node data after processing 'Messenger' Service */
 		}
+		g_free(typedata);
 	}
 
 	xmlnode_free(node);	/* Free the whole XML tree */
--- a/pidgin/gtkblist.c	Sat Oct 06 04:06:30 2007 +0000
+++ b/pidgin/gtkblist.c	Sat Oct 06 04:08:16 2007 +0000
@@ -3663,25 +3663,31 @@
 			else
 				idletime = g_strdup(_("Idle"));
 
-			if (!selected)
+			if (!selected) {
+				g_free(text);
 				text = g_strdup_printf("<span color='%s'>%s</span>\n"
-				"<span color='%s' size='smaller'>%s%s%s</span>",
-				dim_grey(), esc, dim_grey(),
-				idletime != NULL ? idletime : "",
-				(idletime != NULL && statustext != NULL) ? " - " : "",
-				statustext != NULL ? statustext : "");
+					"<span color='%s' size='smaller'>%s%s%s</span>",
+					dim_grey(), esc, dim_grey(),
+					idletime != NULL ? idletime : "",
+					(idletime != NULL && statustext != NULL) ? " - " : "",
+					statustext != NULL ? statustext : "");
+			}
 		}
-		else if (!selected && !statustext) /* We handle selected text later */
+		else if (!selected && !statustext) {/* We handle selected text later */
+			g_free(text);
 			text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc);
-		else if (!selected && !text)
+		} else if (!selected && !text) {
+			g_free(text);
 			text = g_strdup_printf("<span color='%s'>%s</span>\n"
 				"<span color='%s' size='smaller'>%s</span>",
 				dim_grey(), esc, dim_grey(),
 				statustext != NULL ? statustext : "");
+		}
 	} else if (!PURPLE_BUDDY_IS_ONLINE(b)) {
-		if (!selected && !statustext) /* We handle selected text later */
+		if (!selected && !statustext) {/* We handle selected text later */
+			g_free(text);
 			text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc);
-		else if (!selected && !text)
+		} else if (!selected && !text)
 			text = g_strdup_printf("<span color='%s'>%s</span>\n"
 				"<span color='%s' size='smaller'>%s</span>",
 				dim_grey(), esc, dim_grey(),
@@ -3698,13 +3704,15 @@
 	}
 
 	/* It is selected. */
-	if ((selected && !text) || (selected && idletime))
+	if ((selected && !text) || (selected && idletime)) {
+		g_free(text);
 		text = g_strdup_printf("%s\n"
 			"<span size='smaller'>%s%s%s</span>",
 			esc,
 			idletime != NULL ? idletime : "",
 			(idletime != NULL && statustext != NULL) ? " - " : "",
 			statustext != NULL ? statustext :  "");
+	}
 
 	g_free(idletime);
 	g_free(statustext);
--- a/pidgin/plugins/win32/transparency/win2ktrans.c	Sat Oct 06 04:06:30 2007 +0000
+++ b/pidgin/plugins/win32/transparency/win2ktrans.c	Sat Oct 06 04:08:16 2007 +0000
@@ -229,7 +229,7 @@
 conversation_delete_cb(PurpleConversation *conv) {
 	PidginWindow *win = pidgin_conv_get_window(PIDGIN_CONVERSATION(conv));
 	/* If it is the last conversation in the window, cleanup */
-	if (pidgin_conv_window_get_gtkconv_count(win) == 1)
+	if (win != NULL && pidgin_conv_window_get_gtkconv_count(win) == 1)
 		cleanup_conv_window(win);
 }