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