1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +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
+7
View File
@@ -654,9 +654,16 @@ void
spell_config_free ()
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
if (spell_commands_to_check)
{
weechat_string_free_split (spell_commands_to_check);
spell_commands_to_check = NULL;
}
if (spell_length_commands_to_check)
{
free (spell_length_commands_to_check);
spell_length_commands_to_check = NULL;
}
}
+3
View File
@@ -501,5 +501,8 @@ void
spell_speller_end ()
{
weechat_hashtable_free (spell_spellers);
spell_spellers = NULL;
weechat_hashtable_free (spell_speller_buffer);
spell_speller_buffer = NULL;
}
+7
View File
@@ -1188,6 +1188,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
spell_enabled = 0;
spell_warning_aspell_config ();
#ifdef USE_ENCHANT
@@ -1260,10 +1262,15 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
#ifdef USE_ENCHANT
/* release enchant broker */
enchant_broker_free (broker);
broker = NULL;
#endif /* USE_ENCHANT */
if (spell_nick_completer)
{
free (spell_nick_completer);
spell_nick_completer = NULL;
}
spell_len_nick_completer = 0;
return WEECHAT_RC_OK;
}