diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-27 15:28:07 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-27 15:28:07 +0100 |
commit | 3da3ad2506b2326ca533b11b9ab8e2cebb92b63f (patch) | |
tree | 1c800b76dcb68953cd0ea141b87ed816fab46768 /src/libcryptobox | |
parent | 0cde7b0683bf3f9550ad97bfdbedc22511c1505c (diff) | |
download | rspamd-3da3ad2506b2326ca533b11b9ab8e2cebb92b63f.tar.gz rspamd-3da3ad2506b2326ca533b11b9ab8e2cebb92b63f.zip |
[Minor] Further static leaks removal
Diffstat (limited to 'src/libcryptobox')
-rw-r--r-- | src/libcryptobox/cryptobox.c | 9 | ||||
-rw-r--r-- | src/libcryptobox/cryptobox.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/libcryptobox/cryptobox.c b/src/libcryptobox/cryptobox.c index 0b4ebe614..e4549096f 100644 --- a/src/libcryptobox/cryptobox.c +++ b/src/libcryptobox/cryptobox.c @@ -311,6 +311,15 @@ rspamd_cryptobox_init (void) } void +rspamd_cryptobox_deinit (struct rspamd_cryptobox_library_ctx *ctx) +{ + if (ctx) { + g_free (ctx->cpu_extensions); + g_free (ctx); + } +} + +void rspamd_cryptobox_keypair (rspamd_pk_t pk, rspamd_sk_t sk, enum rspamd_cryptobox_mode mode) { diff --git a/src/libcryptobox/cryptobox.h b/src/libcryptobox/cryptobox.h index 3924d7fe3..61395d11f 100644 --- a/src/libcryptobox/cryptobox.h +++ b/src/libcryptobox/cryptobox.h @@ -84,6 +84,7 @@ struct rspamd_cryptobox_library_ctx { */ struct rspamd_cryptobox_library_ctx *rspamd_cryptobox_init (void); +void rspamd_cryptobox_deinit (struct rspamd_cryptobox_library_ctx *); /** * Generate new keypair * @param pk public key buffer |