1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

core: fix crash on plugin reload when using musl libs (closes #2052)

This commit is contained in:
Sébastien Helleu
2023-12-15 22:53:51 +01:00
parent 07fbd30948
commit 75dc8b9d6c
43 changed files with 320 additions and 5 deletions
+1
View File
@@ -840,4 +840,5 @@ void
script_config_free ()
{
weechat_config_free (script_config_file);
script_config_file = NULL;
}
+27
View File
@@ -386,6 +386,27 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* make C compiler happy */
(void) plugin;
if (script_loaded)
{
weechat_hashtable_free (script_loaded);
script_loaded = NULL;
}
if (script_timer_refresh)
{
weechat_unhook (script_timer_refresh);
script_timer_refresh = NULL;
}
if (script_buffer)
{
weechat_buffer_close (script_buffer);
script_buffer = NULL;
}
script_buffer_selected_line = 0;
script_buffer_detail_script = NULL;
script_buffer_detail_script_last_line = 0;
script_buffer_detail_script_line_diff = -1;
script_mouse_end ();
script_config_write ();
@@ -393,10 +414,16 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
script_repo_remove_all ();
if (script_repo_filter)
{
free (script_repo_filter);
script_repo_filter = NULL;
}
if (script_loaded)
{
weechat_hashtable_free (script_loaded);
script_loaded = NULL;
}
script_config_free ();