Mercurial > pidgin
comparison src/log.c @ 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 | 42c62476b61b |
children | 64ca89ffc639 |
comparison
equal
deleted
inserted
replaced
13075:4b7a8787432c | 13076:f3abb141042a |
---|---|
116 | 116 |
117 if(g_hash_table_lookup_extended(logsize_users, lu, NULL, &ptrsize)) { | 117 if(g_hash_table_lookup_extended(logsize_users, lu, NULL, &ptrsize)) { |
118 total = GPOINTER_TO_INT(ptrsize); | 118 total = GPOINTER_TO_INT(ptrsize); |
119 total += written; | 119 total += written; |
120 g_hash_table_replace(logsize_users, lu, GINT_TO_POINTER(total)); | 120 g_hash_table_replace(logsize_users, lu, GINT_TO_POINTER(total)); |
121 } | 121 } else { |
122 | 122 g_free(lu->name); |
123 g_free(lu->name); | 123 g_free(lu); |
124 g_free(lu); | 124 } |
125 | 125 |
126 } | 126 } |
127 | 127 |
128 char *gaim_log_read(GaimLog *log, GaimLogReadFlags *flags) | 128 char *gaim_log_read(GaimLog *log, GaimLogReadFlags *flags) |
129 { | 129 { |