Code

Merge branch 'collectd-5.2' into collectd-5.3
authorFlorian Forster <octo@collectd.org>
Sat, 13 Jul 2013 09:23:32 +0000 (11:23 +0200)
committerFlorian Forster <octo@collectd.org>
Sat, 13 Jul 2013 09:23:32 +0000 (11:23 +0200)
1  2 
src/plugin.c
src/write_graphite.c

diff --cc src/plugin.c
Simple merge
index 949a8425178f700b952787f15bc0426f4f6d7299,bde5fb6e94d9ea41acb39bdf00ba254d5b62dfd1..99c6f4d80a91a669ee0ac86f0bfe0620de6bb13f
@@@ -250,10 -247,12 +249,13 @@@ static void wg_callback_free (void *dat
  
      wg_flush_nolock (/* timeout = */ 0, cb);
  
-     close(cb->sock_fd);
-     cb->sock_fd = -1;
+     if (cb->sock_fd >= 0)
+     {
+         close (cb->sock_fd);
+         cb->sock_fd = -1;
+     }
  
 +    sfree(cb->name);
      sfree(cb->node);
      sfree(cb->service);
      sfree(cb->prefix);