From 201fe7106cb2514f1d4f10c94a9f823b632184b3 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 25 Apr 2014 16:11:11 +0200 Subject: [PATCH] core: Don't leak memory upon an error in the collector loop. --- src/core/plugin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/plugin.c b/src/core/plugin.c index dc3717b..eb9797f 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -1005,6 +1005,9 @@ sdb_plugin_collector_loop(sdb_plugin_loop_t *loop) sdb_log(SDB_LOG_ERR, "core: Failed to sleep " "in collector main loop: %s", sdb_strerror(errno, errbuf, sizeof(errbuf))); + sdb_llist_insert_sorted(collector_list, obj, + plugin_cmp_next_update); + sdb_object_deref(obj); return -1; } errno = 0; -- 2.30.2