Code

stats plugin: close fd on error
[collectd.git] / src / statsd.c
index 82dbce7754aeee5815fe485236fb849449dfd151..7336d37ac2a413479329636fec5ae313755c0032 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;