summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/plugin-api.c10
-rw-r--r--src/plugins/plugin-api.h1
-rw-r--r--src/plugins/plugin-config.c2
-rw-r--r--src/plugins/plugin.c2
4 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c
index f5958a4af..370b7fd41 100644
--- a/src/plugins/plugin-api.c
+++ b/src/plugins/plugin-api.c
@@ -108,6 +108,16 @@ plugin_api_ngettext (const char *single, const char *plural, int count)
}
/*
+ * Frees an option.
+ */
+
+void
+plugin_api_config_file_option_free (struct t_config_option *option)
+{
+ config_file_option_free (option, 1);
+}
+
+/*
* Gets pointer on an option.
*/
diff --git a/src/plugins/plugin-api.h b/src/plugins/plugin-api.h
index e7f8f1ca2..90a19733e 100644
--- a/src/plugins/plugin-api.h
+++ b/src/plugins/plugin-api.h
@@ -30,6 +30,7 @@ extern const char *plugin_api_ngettext (const char *single, const char *plural,
int count);
/* config */
+extern void plugin_api_config_file_option_free (struct t_config_option *option);
extern struct t_config_option *plugin_api_config_get (const char *option_name);
extern const char *plugin_api_config_get_plugin (struct t_weechat_plugin *plugin,
const char *option_name);
diff --git a/src/plugins/plugin-config.c b/src/plugins/plugin-config.c
index 9f2710678..cb37c64f1 100644
--- a/src/plugins/plugin-config.c
+++ b/src/plugins/plugin-config.c
@@ -335,7 +335,7 @@ plugin_config_delete_desc (const void *pointer, void *data,
}
}
- config_file_option_free (option);
+ config_file_option_free (option, 1);
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index 509f8d963..c0aabd180 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -745,7 +745,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
new_plugin->config_write = &config_file_write;
new_plugin->config_read = &config_file_read;
new_plugin->config_reload = &config_file_reload;
- new_plugin->config_option_free = &config_file_option_free;
+ new_plugin->config_option_free = &plugin_api_config_file_option_free;
new_plugin->config_section_free_options = &config_file_section_free_options;
new_plugin->config_section_free = &config_file_section_free;
new_plugin->config_free = &config_file_free;