summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c')
-rw-r--r--src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c b/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
index bc5b85c..fb95359 100644
--- a/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
+++ b/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
@@ -316,7 +316,10 @@ static bool blowfish_ctr_crypt(fastd_context_t *ctx UNUSED, const fastd_cipher_s
}
static void blowfish_ctr_free_state(fastd_context_t *ctx UNUSED, fastd_cipher_state_t *state) {
- free(state);
+ if (state) {
+ secure_memzero(state, sizeof(*state));
+ free(state);
+ }
}
static void blowfish_ctr_free(fastd_context_t *ctx UNUSED, fastd_cipher_context_t *cctx UNUSED) {