core: free nicklist data (for hsignal) on exit

This commit is contained in:
Sebastien Helleu 2013-11-23 16:20:19 +01:00
parent 95d0d33972
commit 0b94d3c3bc
3 changed files with 18 additions and 0 deletions

View File

@ -567,6 +567,9 @@ gui_main_end (int clean_exit)
/* free some variables used for chat area */
gui_chat_end ();
/* free some variables used for nicklist */
gui_nicklist_end ();
}
/* end of Curses output */

View File

@ -1332,3 +1332,17 @@ gui_nicklist_print_log (struct t_gui_nick_group *group, int indent)
log_printf (format, " ", ptr_nick->next_nick);
}
}
/*
* Frees all allocated data.
*/
void
gui_nicklist_end ()
{
if (gui_nicklist_hsignal)
{
hashtable_free (gui_nicklist_hsignal);
gui_nicklist_hsignal = NULL;
}
}

View File

@ -116,5 +116,6 @@ extern int gui_nicklist_add_to_infolist (struct t_infolist *infolist,
struct t_gui_buffer *buffer,
const char *name);
extern void gui_nicklist_print_log (struct t_gui_nick_group *group, int indent);
extern void gui_nicklist_end ();
#endif /* __WEECHAT_GUI_NICKLIST_H */