diff --git a/src/benchmark/clu_benchmark.c b/src/benchmark/clu_benchmark.c index 23ac37f..3d083d0 100644 --- a/src/benchmark/clu_benchmark.c +++ b/src/benchmark/clu_benchmark.c @@ -97,6 +97,7 @@ int wolfCLU_benchmark(int timer, int* option) wc_RNG_GenerateBlock(&rng, iv, AES_BLOCK_SIZE); start = wolfCLU_getTime(); + wc_AesInit(&aes, HEAP_HINT, INVALID_DEVID); wc_AesSetKey(&aes, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION); while (loop) { @@ -107,6 +108,7 @@ int wolfCLU_benchmark(int timer, int* option) /* if stop >= timer, loop = 0 */ loop = (stop >= timer) ? 0 : 1; } + wc_AesFree(&aes); printf("\n"); printf("AES-CBC "); wolfCLU_stats(start, AES_BLOCK_SIZE, blocks); diff --git a/src/pkcs/clu_pkcs7.c b/src/pkcs/clu_pkcs7.c index 902b939..8f5df38 100644 --- a/src/pkcs/clu_pkcs7.c +++ b/src/pkcs/clu_pkcs7.c @@ -71,6 +71,8 @@ int wolfCLU_PKCS7(int argc, char** argv) int derContentSz = 0; int freePkcs7 = 0; + XMEMSET(&pkcs7, 0, sizeof(PKCS7)); + opterr = 0; /* do not display unrecognized options */ optind = 0; /* start at indent 0 */ while ((option = wolfCLU_GetOpt(argc, argv, "",