if(c->socket)
closesocket(c->socket);
- event_del(&c->ev);
-
if(c->edge) {
if(report && !tunnelserver)
send_del_edge(broadcast, c->edge);
}
}
- free(c->outbuf);
- c->outbuf = NULL;
- c->outbuflen = 0;
- c->outbufsize = 0;
- c->outbufstart = 0;
-
/* Check if this was our outgoing connection */
if(c->outgoing)
static void sighup_handler(int signal, short events, void *data) {
connection_t *c;
- splay_node_t *node;
+ splay_node_t *node, *next;
char *fname;
struct stat s;
static time_t last_config_check = 0;
/* Close connections to hosts that have a changed or deleted host config file */
- for(node = connection_tree->head; node; node = node->next) {
+ for(node = connection_tree->head; node; node = next) {
c = node->data;
+ next = node->next;
if(c->outgoing) {
free(c->outgoing->name);