From 940e66bb89cc2ebe05ecc71f78851460e5df35ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Eldst=C3=A5l-Damlin?= Date: Mon, 14 Dec 2009 21:59:32 +0100 Subject: Fix and use filter_configured_new() --- src/filter_plugin.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/filter_plugin.c') diff --git a/src/filter_plugin.c b/src/filter_plugin.c index 456772677..ecc4b5432 100644 --- a/src/filter_plugin.c +++ b/src/filter_plugin.c @@ -49,14 +49,18 @@ filter_configured_new(const struct config_param *param, GError **error_r) assert(error_r == NULL || *error_r == NULL); plugin_name = config_get_block_string(param, "plugin", NULL); - if (plugin_name == NULL) + if (plugin_name == NULL) { g_set_error(error_r, config_quark(), 0, "No filter plugin specified"); + return NULL; + } plugin = filter_plugin_by_name(plugin_name); - if (plugin == NULL) + if (plugin == NULL) { g_set_error(error_r, config_quark(), 0, "No such filter plugin: %s", plugin_name); + return NULL; + } return filter_new(plugin, param, error_r); } -- cgit v1.2.3