changeset 14080:ec4a3eb4c709

[gaim-migrate @ 16701] leak fix committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 11 Aug 2006 03:01:14 +0000
parents 25a2b762cd61
children dee8540be099
files plugins/log_reader.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/log_reader.c	Fri Aug 11 02:42:13 2006 +0000
+++ b/plugins/log_reader.c	Fri Aug 11 03:01:14 2006 +0000
@@ -790,6 +790,7 @@
 		time_t time_unix;
 		struct tm *tm_new;
 		char *timestamp;
+		char *tmp;
 		const char *style;
 
 		new_session_id = xmlnode_get_attrib(message, "SessionID");
@@ -982,16 +983,18 @@
 
 		style     = xmlnode_get_attrib(text_node, "Style");
 
+		tmp = xmlnode_get_data(text_node);
 		if (style && *style) {
 			text = g_string_append(text, "<span style=\"");
 			text = g_string_append(text, style);
 			text = g_string_append(text, "\">");
-			text = g_string_append(text, xmlnode_get_data(text_node));
+			text = g_string_append(text, tmp);
 			text = g_string_append(text, "</span>\n");
 		} else {
-			text = g_string_append(text, xmlnode_get_data(text_node));
+			text = g_string_append(text, tmp);
 			text = g_string_append(text, "\n");
 		}
+		g_free(tmp);
 	}
 
 	data->text = text;
@@ -1462,7 +1465,7 @@
 
 						g_string_append(formatted,
 							"<span style=\"color: #ff0000;\">");
-						
+
 						if (gaim_str_has_prefix(line,
 							"Your previous message has not been sent.  "
 							"Reason: Maximum length exceeded.")) {
@@ -1686,7 +1689,7 @@
 
 	path = NULL;
 	/* TODO: Test this after removing the trailing "\\". */
-	if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, "Trillian.SkinZip\\shell\\Add\\command\\", 
+	if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, "Trillian.SkinZip\\shell\\Add\\command\\",
 				0, KEY_QUERY_VALUE, &hKey)) {
 
 		if(ERROR_SUCCESS == RegQueryValueEx(hKey, "", NULL, &type, (LPBYTE)buffer, &size)) {