X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconnection.c;h=a369cb83d900827a5741c77343de39bc64c5dafe;hp=21cb6aa93398229ad9bb848134d23557104c6ac9;hb=1b8f8918360b40a2749d40355266ed7dedbe41b5;hpb=f42e57f663a2663c830c4fb4c01927c2d3c89c09 diff --git a/src/connection.c b/src/connection.c index 21cb6aa9..a369cb83 100644 --- a/src/connection.c +++ b/src/connection.c @@ -23,6 +23,7 @@ #include "system.h" #include "splay_tree.h" +#include "cipher.h" #include "conf.h" #include "list.h" #include "logger.h" @@ -73,14 +74,8 @@ void free_connection(connection_t *c) { if(c->hostname) free(c->hostname); - if(c->inkey) - free(c->inkey); - - if(c->outkey) - free(c->outkey); - - if(c->mychallenge) - free(c->mychallenge); + cipher_close(&c->incipher); + cipher_close(&c->outcipher); if(c->hischallenge) free(c->hischallenge);