1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-19 01:24:46 +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
+15
View File
@@ -1471,6 +1471,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_python_plugin = plugin;
python_quiet = 0;
python_eval_mode = 0;
python_eval_send_input = 0;
python_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1582,12 +1587,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (python_action_install_list)
{
free (python_action_install_list);
python_action_install_list = NULL;
}
if (python_action_remove_list)
{
free (python_action_remove_list);
python_action_remove_list = NULL;
}
if (python_action_autoload_list)
{
free (python_action_autoload_list);
python_action_autoload_list = NULL;
}
weechat_string_dyn_free (python_buffer_output, 1);
python_buffer_output = NULL;
return WEECHAT_RC_OK;
}