1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 05:46:38 +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
@@ -4106,6 +4106,7 @@ void
irc_config_free ()
{
weechat_config_free (irc_config_file);
irc_config_file = NULL;
if (irc_config_hook_config_nick_color_options)
{
+1
View File
@@ -1340,4 +1340,5 @@ irc_list_end ()
weechat_hashtable_free (irc_list_filter_hashtable_options);
irc_list_filter_hashtable_options = NULL;
}
irc_list_hdata_list_channel = NULL;
}
+9
View File
@@ -1307,9 +1307,18 @@ void
irc_notify_end ()
{
if (irc_notify_timer_ison)
{
weechat_unhook (irc_notify_timer_ison);
irc_notify_timer_ison = NULL;
}
if (irc_notify_timer_whois)
{
weechat_unhook (irc_notify_timer_whois);
irc_notify_timer_whois = NULL;
}
if (irc_notify_hsignal)
{
weechat_unhook (irc_notify_hsignal);
irc_notify_hsignal = NULL;
}
}
+5
View File
@@ -673,6 +673,11 @@ irc_raw_end ()
{
irc_raw_message_free_all ();
if (irc_raw_buffer)
{
weechat_buffer_close (irc_raw_buffer);
irc_raw_buffer = NULL;
}
if (irc_raw_filter)
{
free (irc_raw_filter);
+6
View File
@@ -193,6 +193,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
irc_signal_quit_received = 0;
irc_signal_upgrade_received = 0;
if (!irc_config_init ())
return WEECHAT_RC_ERROR;
@@ -314,7 +317,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
(void) plugin;
if (irc_hook_timer)
{
weechat_unhook (irc_hook_timer);
irc_hook_timer = NULL;
}
if (irc_signal_upgrade_received)
{