From: Florian Forster Date: Sat, 13 Jul 2013 09:23:32 +0000 (+0200) Subject: Merge branch 'collectd-5.2' into collectd-5.3 X-Git-Tag: collectd-5.3.1~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a320c4a23fee0e900a7cd2310c771b8dbd2a2d82;p=collectd.git Merge branch 'collectd-5.2' into collectd-5.3 --- a320c4a23fee0e900a7cd2310c771b8dbd2a2d82 diff --cc src/write_graphite.c index 949a8425,bde5fb6e..99c6f4d8 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@@ -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);