projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e96afed
)
libcollectdclient: don't close socket twice
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 18:02:32 +0000
(19:02 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 18:02:32 +0000
(19:02 +0100)
CID #38039
src/libcollectdclient/network.c
patch
|
blob
|
history
diff --git
a/src/libcollectdclient/network.c
b/src/libcollectdclient/network.c
index
0539cd0
..
7b98497
100644
(file)
--- a/
src/libcollectdclient/network.c
+++ b/
src/libcollectdclient/network.c
@@
-89,6
+89,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;
@@
-107,12
+108,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);