stats plugin: close fd on error
[collectd.git] / src / statsd.c
index 82dbce7..7336d37 100644 (file)
@@ -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;