From 6825f1e67eb5ccf5083ef5e848f9c9f8de222170 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 10 Dec 2002 20:30:03 +0000 Subject: GC fixes. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3056 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/perl-common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/perl/perl-common.c') 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, -- cgit v1.2.3