diff options
Diffstat (limited to 'protocols/bee_chat.c')
| -rw-r--r-- | protocols/bee_chat.c | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/protocols/bee_chat.c b/protocols/bee_chat.c index c5f2b262..31b37737 100644 --- a/protocols/bee_chat.c +++ b/protocols/bee_chat.c @@ -284,3 +284,20 @@ void bee_chat_list_finish(struct im_connection *ic)  	imcb_log(ic, "Warning: using deprecated bee_chat_list_finish. This will be removed in the stable release.");  	imcb_chat_list_finish(ic);  } + +void imcb_chat_list_free(struct im_connection *ic) +{ +	bee_chat_info_t *ci; +	GSList *l = ic->chatlist; + +	while (l) { +		ci = l->data; +		l = g_slist_delete_link(l, l); + +		g_free(ci->title); +		g_free(ci->topic); +		g_free(ci); +	} + +	ic->chatlist = NULL; +} | 
