From 5d591599384bec7bcad2ce4c1453e43c67512c9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Luis=20Sanmart=C3=ADn=20Rozada?= Date: Mon, 8 Jun 2015 21:31:38 +0200 Subject: [PATCH] Do not call plugin_unregister if the read registration fails. --- src/daemon/plugin.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index 500b97c6..ea9d2e93 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -1367,7 +1367,6 @@ int plugin_register_flush (const char *name, { ERROR ("plugin_register_flush: malloc failed."); sfree(flush_name); - plugin_unregister (list_flush, name); return (-1); } @@ -1377,7 +1376,6 @@ int plugin_register_flush (const char *name, ERROR ("plugin_register_flush: strdup failed."); sfree(cb); sfree(flush_name); - plugin_unregister (list_flush, name); return (-1); } cb->timeout = ctx.flush_timeout; @@ -1397,7 +1395,6 @@ int plugin_register_flush (const char *name, { sfree(cb->name); sfree(cb); - plugin_unregister (list_flush, name); return status; } } -- 2.30.2