collectd.conf(5): Added a note about that trailing whitespace bug.
[collectd.git] / src / network.c
index c233de6..32af404 100644 (file)
  *   Florian octo Forster <octo at verplant.org>
  **/
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -284,6 +288,7 @@ int network_create_socket (const char *node, const char *service)
                {
                        if (network_bind_socket (se, ai_ptr) != 0)
                        {
+                               close (se->fd);
                                free (se->addr);
                                free (se);
                                continue;