X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconnection.c;h=713a40cbfc12fb76147345291264c1e64f78dd4c;hp=956607caaeb0c49ef72db81ad287f8483f787536;hb=d1cd3c81455ecb32149cbaa424b7870075b2b2fc;hpb=30ef2a981e1d62692b3a2363e0b3a0e8711d9604 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); }