mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 03:33:12 +02:00
Fix crash when setting wrong value in option irc.server.xxx.sasl_mechanism (bug #32670)
This commit is contained in:
@@ -1177,6 +1177,14 @@ config_file_option_set (struct t_config_option *option, const char *value,
|
||||
else
|
||||
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (old_value_was_null)
|
||||
{
|
||||
free (option->value);
|
||||
option->value = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1226,6 +1234,14 @@ config_file_option_set (struct t_config_option *option, const char *value,
|
||||
else
|
||||
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (old_value_was_null)
|
||||
{
|
||||
free (option->value);
|
||||
option->value = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user