From: Sebastian Harl Date: Fri, 25 Apr 2014 14:11:11 +0000 (+0200) Subject: core: Don't leak memory upon an error in the collector loop. X-Git-Tag: sysdb-0.1.0~81^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=201fe7106cb2514f1d4f10c94a9f823b632184b3;p=sysdb.git core: Don't leak memory upon an error in the collector loop. --- 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;