1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

fixed using already free'd memory.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1648 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-07-25 19:29:50 +00:00 committed by cras
parent f81291622f
commit 5eca2d861f
2 changed files with 3 additions and 2 deletions

View File

@ -144,8 +144,8 @@ void expando_destroy(const char *key, EXPANDO_FUNC func)
} else if (g_hash_table_lookup_extended(expandos, key, &origkey,
(gpointer *) &rec)) {
if (rec->func == func) {
g_free(origkey);
g_hash_table_remove(expandos, key);
g_free(origkey);
g_free(rec);
}
}

View File

@ -405,7 +405,7 @@ void module_unload(MODULE_REC *module)
static void uniq_get_modules(char *key, void *value, GSList **list)
{
*list = g_slist_append(*list, key);
*list = g_slist_append(*list, g_strdup(key));
}
void modules_init(void)
@ -434,6 +434,7 @@ void modules_deinit(void)
while (list != NULL) {
module_uniq_destroy(list->data);
g_free(list->data);
list = g_slist_remove(list, list->data);
}