From 5b0b730b82c8e0d131beca90dac2b3aeafb66403 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Luis=20Sanmart=C3=ADn=20Rozada?= Date: Mon, 8 Jun 2015 21:36:05 +0200 Subject: [PATCH] plugin: not return -1 if plugin_flush_callback_name fails --- src/daemon/plugin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index ea9d2e93..88a2af4f 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -1625,11 +1625,11 @@ int plugin_unregister_flush (const char *name) char *flush_name; flush_name = plugin_flush_callback_name (name); - if (flush_name == NULL) - return (-1); - - plugin_unregister_read(flush_name); - sfree(flush_name); + if (flush_name != NULL) + { + plugin_unregister_read(flush_name); + sfree(flush_name); + } } return plugin_unregister (list_flush, name); -- 2.30.2