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:
parent
f81291622f
commit
5eca2d861f
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user