mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 12:56:37 +02:00
core: free some variables used for weechat.conf when quitting WeeChat
This commit is contained in:
@@ -3021,3 +3021,34 @@ config_weechat_write ()
|
||||
{
|
||||
return config_file_write (weechat_config_file);
|
||||
}
|
||||
|
||||
/*
|
||||
* config_weechat_free: free WeeChat configuration file and vars
|
||||
*/
|
||||
|
||||
void
|
||||
config_weechat_free ()
|
||||
{
|
||||
config_file_free (weechat_config_file);
|
||||
|
||||
if (config_highlight_regex)
|
||||
{
|
||||
regfree (config_highlight_regex);
|
||||
free (config_highlight_regex);
|
||||
config_highlight_regex = NULL;
|
||||
}
|
||||
|
||||
if (config_highlight_tags)
|
||||
{
|
||||
string_free_split (config_highlight_tags);
|
||||
config_highlight_tags = NULL;
|
||||
config_num_highlight_tags = 0;
|
||||
}
|
||||
|
||||
if (config_plugin_extensions)
|
||||
{
|
||||
string_free_split (config_plugin_extensions);
|
||||
config_plugin_extensions = NULL;
|
||||
config_num_plugin_extensions = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,5 +279,6 @@ extern int config_weechat_notify_set (struct t_gui_buffer *buffer,
|
||||
extern int config_weechat_init ();
|
||||
extern int config_weechat_read ();
|
||||
extern int config_weechat_write ();
|
||||
extern void config_weechat_free ();
|
||||
|
||||
#endif /* __WEECHAT_CONFIG_H */
|
||||
|
||||
@@ -521,6 +521,7 @@ main (int argc, char *argv[])
|
||||
(void) config_weechat_write (NULL); /* save WeeChat config file */
|
||||
gui_main_end (1); /* shut down WeeChat GUI */
|
||||
proxy_free_all (); /* free all proxies */
|
||||
config_weechat_free (); /* free weechat.conf and vars */
|
||||
config_file_free_all (); /* free all configuration files */
|
||||
gui_key_end (); /* remove all keys */
|
||||
unhook_all (); /* remove all hooks */
|
||||
|
||||
Reference in New Issue
Block a user