changeset 7533:66d6f5c4a14a

[gaim-migrate @ 8146] This should fix a pair of leaks. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 17 Nov 2003 02:36:17 +0000
parents a7a28e3f0147
children 5f1531ec872a
files plugins/history.c src/gtklog.c
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/history.c	Sun Nov 16 19:59:49 2003 +0000
+++ b/plugins/history.c	Mon Nov 17 02:36:17 2003 +0000
@@ -41,6 +41,12 @@
 	gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(gtkconv->imhtml), &end, 0,
 			TRUE, 0, 0);
 	g_free(history);
+	for (;logs;logs = logs->next) {
+		GaimLog *log = logs->data;
+		g_free(log->name);
+		g_free(log);
+	}
+	
 }
 
 static gboolean
--- a/src/gtklog.c	Sun Nov 16 19:59:49 2003 +0000
+++ b/src/gtklog.c	Mon Nov 17 02:36:17 2003 +0000
@@ -67,7 +67,12 @@
 	g_hash_table_remove(log_viewers, ht);
 	g_free(ht->screenname);
 	g_free(ht);
-	g_free(lv);
+	for (;lv->logs;lv->logs = lv->logs->next) {
+		GaimLog *log = lv->logs->data;
+		g_free(log->name);
+		g_free(log);
+	}
+	g_free(lv);		
 	gtk_widget_destroy(w);
 
 	return TRUE;