X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fconnection.c;h=4f8d4fd782bb8ed77c9b83257ec607a317955aae;hb=d93d4f9dbd09bc5e53a9b5eeb1cc94939fee32bc;hp=16878ea8e784d47a3d371066c01ca009b825065f;hpb=8cb4dbb04af15e95e9a302670a4c6fd21e0ebfd6;p=tinc diff --git a/src/connection.c b/src/connection.c index 16878ea8..4f8d4fd7 100644 --- a/src/connection.c +++ b/src/connection.c @@ -58,7 +58,7 @@ connection_t *new_connection(void) { } #ifndef DISABLE_LEGACY -bool init_crypto_by_nid(legacy_crypto_t *c, int cipher, int digest) { +bool init_crypto_by_nid(legacy_crypto_t *c, nid_t cipher, nid_t digest) { if(!cipher_open_by_nid(&c->cipher, cipher)) { return false; } @@ -148,7 +148,8 @@ void free_connection(connection_t *c) { free(c->hostname); if(c->config_tree) { - exit_configuration(&c->config_tree); + exit_configuration(c->config_tree); + c->config_tree = NULL; } free(c);