From: Manuel Luis SanmartĂ­n Rozada Date: Mon, 8 Jun 2015 19:36:05 +0000 (+0200) Subject: plugin: not return -1 if plugin_flush_callback_name fails X-Git-Tag: collectd-5.6.0~696^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5b0b730b82c8e0d131beca90dac2b3aeafb66403;p=collectd.git plugin: not return -1 if plugin_flush_callback_name fails --- 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);