From c90c71ea30e8b02607ff42a530b67c06a984d6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 4 Nov 2023 07:37:12 +0100 Subject: [PATCH] core: fix double call to hook config when an option is unset --- ChangeLog.adoc | 2 +- src/core/wee-config-file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 55837af82..7cd5ebf21 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -27,7 +27,7 @@ New features:: Bug fixes:: - * core: call hook config when options are freed by unset or when file/section is freed + * core: call hook config when options are removed * core: display an error with command `/history N` when N is not a valid integer * core: fix memory leak when config version is invalid or not supported * core: fix crash when "config_version" is present in a configuration file without a value diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 27c90bdd6..71fb7ef72 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -2232,7 +2232,7 @@ config_file_option_unset (struct t_config_option *option) } else { - config_file_option_free (option, 1); + config_file_option_free (option, 0); rc = WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED; }