summaryrefslogtreecommitdiffstats
path: root/module/icp/algs/modes/modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/icp/algs/modes/modes.c')
-rw-r--r--module/icp/algs/modes/modes.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/icp/algs/modes/modes.c b/module/icp/algs/modes/modes.c
index f07876a47..faae9722b 100644
--- a/module/icp/algs/modes/modes.c
+++ b/module/icp/algs/modes/modes.c
@@ -152,6 +152,14 @@ crypto_free_mode_ctx(void *ctx)
vmem_free(((gcm_ctx_t *)ctx)->gcm_pt_buf,
((gcm_ctx_t *)ctx)->gcm_pt_buf_len);
+#ifdef CAN_USE_GCM_ASM
+ if (((gcm_ctx_t *)ctx)->gcm_Htable != NULL) {
+ gcm_ctx_t *gcm_ctx = (gcm_ctx_t *)ctx;
+ bzero(gcm_ctx->gcm_Htable, gcm_ctx->gcm_htab_len);
+ kmem_free(gcm_ctx->gcm_Htable, gcm_ctx->gcm_htab_len);
+ }
+#endif
+
kmem_free(ctx, sizeof (gcm_ctx_t));
}
}