summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcc889e)
raw | patch | inline | side by side (parent: fcc889e)
author | Florian Forster <octo@collectd.org> | |
Sat, 13 Jul 2013 05:46:20 +0000 (07:46 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 13 Jul 2013 05:46:20 +0000 (07:46 +0200) |
src/write_graphite.c | patch | blob | history |
diff --git a/src/write_graphite.c b/src/write_graphite.c
index aa87896f7bf5c504c53c3cd3d2d547f3bf004a7f..bde5fb6e94d9ea41acb39bdf00ba254d5b62dfd1 100644 (file)
--- a/src/write_graphite.c
+++ b/src/write_graphite.c
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->node);
sfree(cb->service);