changeset 13076:f3abb141042a

[gaim-migrate @ 15438] (21:39:36) Sadrul Habib Chowdhury (sadrul): rlaager: i think this change needs to be made. g_hash_table_replace replaces (and frees) the old key, so it's not a good idea to free the new one while it's in use committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 31 Jan 2006 03:41:59 +0000
parents 4b7a8787432c
children 64ca89ffc639
files src/log.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/log.c	Mon Jan 30 06:22:39 2006 +0000
+++ b/src/log.c	Tue Jan 31 03:41:59 2006 +0000
@@ -118,11 +118,11 @@
 		total = GPOINTER_TO_INT(ptrsize);
 		total += written;
 		g_hash_table_replace(logsize_users, lu, GINT_TO_POINTER(total));
+	} else {
+		g_free(lu->name);
+		g_free(lu);
 	}
 
-	g_free(lu->name);
-	g_free(lu);
-
 }
 
 char *gaim_log_read(GaimLog *log, GaimLogReadFlags *flags)