diff options
Diffstat (limited to 'src/chachapoly.c')
-rw-r--r-- | src/chachapoly.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/chachapoly.c b/src/chachapoly.c index f3319b62..12600e85 100644 --- a/src/chachapoly.c +++ b/src/chachapoly.c @@ -187,6 +187,10 @@ static int chacha20_poly1305_aead_decrypt(struct ssh_cipher_struct *cipher, return SSH_OK; } +static void chacha20_cleanup(struct ssh_cipher_struct *cipher) { + SAFE_FREE(cipher->chacha20_schedule); +} + const struct ssh_cipher_struct chacha20poly1305_cipher = { .name = "chacha20-poly1305@openssh.com", .blocksize = 8, @@ -198,5 +202,6 @@ const struct ssh_cipher_struct chacha20poly1305_cipher = { .set_decrypt_key = chacha20_set_encrypt_key, .aead_encrypt = chacha20_poly1305_aead_encrypt, .aead_decrypt_length = chacha20_poly1305_aead_decrypt_length, - .aead_decrypt = chacha20_poly1305_aead_decrypt + .aead_decrypt = chacha20_poly1305_aead_decrypt, + .cleanup = chacha20_cleanup }; |