X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fconnection.c;h=713a40cbfc12fb76147345291264c1e64f78dd4c;hb=bbeab00f46a6c856573fe0d2b9b85bce35728403;hp=956607caaeb0c49ef72db81ad287f8483f787536;hpb=027228debee2ea6f31cd176e456c13d626380066;p=tinc diff --git a/src/connection.c b/src/connection.c index 956607ca..713a40cb 100644 --- a/src/connection.c +++ b/src/connection.c @@ -87,6 +87,9 @@ void free_connection(connection_t *c) { if(event_initialized(&c->outevent)) event_del(&c->outevent); + if(c->socket > 0) + closesocket(c->socket); + free(c); }