1
0
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:
Sebastien Helleu
2011-03-03 22:06:08 +01:00
parent 3d8553316f
commit e8df46c005
2 changed files with 19 additions and 1 deletions
+16
View File
@@ -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;