Replace pointers to cipher_t/digest_t in connection_t with structs.
[tinc] / src / gcrypt / cipher.c
index 8306531..d8e4cc5 100644 (file)
@@ -147,7 +147,8 @@ void cipher_close(cipher_t *cipher) {
        }
 
        free(cipher->key);
-       cipher->key = NULL;
+
+       memset(cipher, 0, sizeof(*cipher));
 }
 
 size_t cipher_keylength(const cipher_t *cipher) {