From 93f38a8c5cf4e9e870872bd7b5c9011af0e2a751 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 5 Dec 2015 13:42:33 +0100 Subject: [PATCH] stats plugin: close fd on error CID #37995 Signed-off-by: Florian Forster --- src/statsd.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2