summaryrefslogtreecommitdiff
path: root/src/plugins/tcl/weechat-tcl.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-12-15 22:53:51 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-12-15 22:53:51 +0100
commit75dc8b9d6c2c2f816ecbeffa4d4b048ebc2d5f58 (patch)
tree0ef749137348dca1ee0acd2fdd07184b2cf835f8 /src/plugins/tcl/weechat-tcl.c
parent07fbd309487b7de977e5798e67e70de1bd2fed8a (diff)
downloadweechat-75dc8b9d6c2c2f816ecbeffa4d4b048ebc2d5f58.zip
core: fix crash on plugin reload when using musl libs (closes #2052)
Diffstat (limited to 'src/plugins/tcl/weechat-tcl.c')
-rw-r--r--src/plugins/tcl/weechat-tcl.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c
index b202e7c44..55dab3baa 100644
--- a/src/plugins/tcl/weechat-tcl.c
+++ b/src/plugins/tcl/weechat-tcl.c
@@ -56,7 +56,6 @@ struct t_plugin_script *tcl_script_eval = NULL;
int tcl_eval_mode = 0;
int tcl_eval_send_input = 0;
int tcl_eval_exec_commands = 0;
-struct t_gui_buffer *tcl_eval_buffer = NULL;
struct t_plugin_script *tcl_scripts = NULL;
struct t_plugin_script *last_tcl_script = NULL;
@@ -928,6 +927,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_tcl_plugin = plugin;
+ tcl_quiet = 0;
+ tcl_eval_mode = 0;
+ tcl_eval_send_input = 0;
+ tcl_eval_exec_commands = 0;
+
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -984,11 +988,20 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (tcl_action_install_list)
+ {
free (tcl_action_install_list);
+ tcl_action_install_list = NULL;
+ }
if (tcl_action_remove_list)
+ {
free (tcl_action_remove_list);
+ tcl_action_remove_list = NULL;
+ }
if (tcl_action_autoload_list)
+ {
free (tcl_action_autoload_list);
+ tcl_action_autoload_list = NULL;
+ }
/* weechat_string_dyn_free (tcl_buffer_output, 1); */
return WEECHAT_RC_OK;