projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
951af13
)
libcollectdclient: don't close socket twice
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 18:02:32 +0000
(19:02 +0100)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 12 Jan 2016 06:54:54 +0000
(07:54 +0100)
CID #38039
src/libcollectdclient/network.c
patch
|
blob
|
history
diff --git
a/src/libcollectdclient/network.c
b/src/libcollectdclient/network.c
index
6733cda
..
2f296f6
100644
(file)
--- a/
src/libcollectdclient/network.c
+++ b/
src/libcollectdclient/network.c
@@
-83,6
+83,7
@@
static int server_close_socket (lcc_server_t *srv) /* {{{ */
return (0);
close (srv->fd);
+ srv->fd = -1;
free (srv->sa);
srv->sa = NULL;
srv->sa_len = 0;
@@
-101,12
+102,6
@@
static void int_server_destroy (lcc_server_t *srv) /* {{{ */
next = srv->next;
- if (srv->fd >= 0)
- {
- close (srv->fd);
- srv->fd = -1;
- }
-
free (srv->node);
free (srv->service);
free (srv->username);