From: Ruben Kerkhof Date: Sat, 5 Dec 2015 12:42:33 +0000 (+0100) Subject: stats plugin: close fd on error X-Git-Tag: collectd-5.5.1~25^2~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=93f38a8c5cf4e9e870872bd7b5c9011af0e2a751;p=collectd.git stats plugin: close fd on error CID #37995 Signed-off-by: Florian Forster --- diff --git a/src/statsd.c b/src/statsd.c index 82dbce77..7336d37a 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -557,6 +557,7 @@ static int statsd_network_init (struct pollfd **ret_fds, /* {{{ */ if (tmp == NULL) { ERROR ("statsd plugin: realloc failed."); + close (fd); continue; } fds = tmp;