diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-10 20:30:03 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-10 20:30:03 +0000 |
commit | 6825f1e67eb5ccf5083ef5e848f9c9f8de222170 (patch) | |
tree | 61d23cd280d3f70c2bdb09bdd4c2f97c4dde4540 /src/perl/perl-common.c | |
parent | bb55d3ff4d0b9f889f3c9834c10ad014f2edf9a1 (diff) | |
download | irssi-6825f1e67eb5ccf5083ef5e848f9c9f8de222170.zip |
GC fixes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3056 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-common.c')
-rw-r--r-- | src/perl/perl-common.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index cd23afe5..d39d351c 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -613,13 +613,14 @@ static int free_iobject_proto(void *key, void *value, void *chat_type) static void perl_unregister_protocol(CHAT_PROTOCOL_REC *rec) { - GSList *item; + GSList *item; + void *data; item = gslist_find_icase_string(use_protocols, rec->name); if (item != NULL) { - g_free(item->data); - use_protocols = - g_slist_remove(use_protocols, item->data); + data = item->data; + use_protocols = g_slist_remove(use_protocols, data); + g_free(data); } g_hash_table_foreach_remove(iobject_stashes, (GHRFunc) free_iobject_proto, |