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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user