projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Close the proper filedescriptor (if it exists).
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
ccd600b
..
f53127b
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-572,8
+572,14
@@
void close_network_connections(void)
next = node->next;
c = node->data;
next = node->next;
c = node->data;
- if(c->outgoing)
- free(c->outgoing->name), free(c->outgoing), c->outgoing = NULL;
+ if(c->outgoing) {
+ if(c->outgoing->ai)
+ freeaddrinfo(c->outgoing->ai);
+ free(c->outgoing->name);
+ free(c->outgoing);
+ c->outgoing = NULL;
+ }
+
terminate_connection(c, false);
}
terminate_connection(c, false);
}