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
@@@ -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);