diff options
Diffstat (limited to 'libcmix/cmix.c')
| -rw-r--r-- | libcmix/cmix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcmix/cmix.c b/libcmix/cmix.c index c60f441..00b080f 100644 --- a/libcmix/cmix.c +++ b/libcmix/cmix.c @@ -17,6 +17,7 @@ struct CMixContext initialize_cmix_context(struct Api api) { return (struct CMixContext){ .api = api, .nr_participants = 0, + .network_key = NULL, .r = NULL, .s = NULL, .permutation = NULL, @@ -59,6 +60,10 @@ void release_mix(struct CMixContext* ctx) { void deinitialize(struct CMixContext* ctx) { ctx->api.free_keypair(&ctx->keypair); + if(ctx->network_key != NULL) { + ctx->api.free_group_element(ctx->network_key); + ctx->network_key = NULL; + } release_mix(ctx); ctx->api.deinitialize(); } @@ -221,6 +226,8 @@ enum cmix_error permute_and_multiply_encrypted_s(struct CMixContext const* ctx, ctx->api.free_group_element(message_r); ctx->api.free_group_element(random_s); ctx->api.free_group_element(message_s); + ctx->api.free_group_element(random_pirs); + ctx->api.free_group_element(message_pirs); } return no_error; |
