diff options
Diffstat (limited to 'src/perl')
-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, |