X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=hfal-performance.c;h=c64e7e962fbed888c528d8bfb64ad199a6a6b212;hp=8c5b36db6dc5dac7fd8ff6d443d460333bd28eb7;hb=6483e60140be5fe4ab60de85cdf679fc0518dc99;hpb=b022a029def51d63f330c12bf07156db294c8958 diff --git a/hfal-performance.c b/hfal-performance.c index 8c5b36d..c64e7e9 100644 --- a/hfal-performance.c +++ b/hfal-performance.c @@ -79,6 +79,9 @@ void hfal_performance(const hfdesc_t* hd){ hf.init(&ctx); STOP_TIMER; t += stopTimer(); + if(i!=31 && hf.free){ + hf.free(&ctx) + } } t>>=5; cli_putstr_P(PSTR("\r\n init (cycles): ")); @@ -119,6 +122,10 @@ void hfal_performance(const hfdesc_t* hd){ t>>=5; cli_putstr_P(PSTR("\r\n ctx2hash (cycles): ")); printvalue(t); + + if(hf.free){ + hf.free(&ctx); + } }