/*
connection.c -- connection list management
- Copyright (C) 2000-2006 Guus Sliepen <guus@tinc-vpn.org>,
+ Copyright (C) 2000-2007 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
{
cp();
+ if(c->name)
+ free(c->name);
+
if(c->hostname)
free(c->hostname);
if(c->outkey)
free(c->outkey);
+ if(c->inctx) {
+ EVP_CIPHER_CTX_cleanup(c->inctx);
+ free(c->inctx);
+ }
+
+ if(c->outctx) {
+ EVP_CIPHER_CTX_cleanup(c->outctx);
+ free(c->outctx);
+ }
+
if(c->mychallenge)
free(c->mychallenge);
if(c->hischallenge)
free(c->hischallenge);
+ if(c->config_tree)
+ exit_configuration(&c->config_tree);
+
+ if(c->outbuf)
+ free(c->outbuf);
+
+ if(c->rsa_key)
+ RSA_free(c->rsa_key);
+
free(c);
}