diff --git a/demos/timing.c b/demos/timing.c index f91f6f4c..0c06a6cf 100644 --- a/demos/timing.c +++ b/demos/timing.c @@ -674,6 +674,7 @@ static const struct { } t2 >>= 2; fprintf(stderr, "DSA-(%lu, %lu) make_key took %15"PRI64"u cycles\n", (unsigned long)groups[x].group*8, (unsigned long)groups[x].modulus*8, t2); + dsa_free(&key); } fprintf(stderr, "\n\n"); } diff --git a/tests/file_test.c b/tests/file_test.c index c2e4a381..8cb4eaf6 100644 --- a/tests/file_test.c +++ b/tests/file_test.c @@ -23,7 +23,9 @@ int file_test(void) len = sizeof(buf); if ((in = fopen(fname, "rb")) == NULL) return CRYPT_FILE_NOTFOUND; - if ((err = hash_filehandle(isha256, in, buf, &len)) != CRYPT_OK) return err; + err = hash_filehandle(isha256, in, buf, &len); + fclose(in); + if (err != CRYPT_OK) return err; if (compare_testvector(buf, len, exp_sha256, 32, "hash_filehandle", 1)) return 1; len = sizeof(buf); diff --git a/tests/rsa_test.c b/tests/rsa_test.c index 5352be8a..754127c3 100644 --- a/tests/rsa_test.c +++ b/tests/rsa_test.c @@ -193,6 +193,7 @@ static int rsa_compat_test(void) fprintf(stderr, "RSA rsa_verify_hash_ex + LTC_PKCS_1_V1_5_NA1 failed\n"); return 1; } + rsa_free(&pubkey); /* now try to export private/public and compare */ len = sizeof(buf);