fix resource cleanup in testsuite and wolfcrypt test

This commit is contained in:
Chris Conlon
2015-10-09 10:57:55 -06:00
parent 9f6b07aec2
commit 7e5be2f313
4 changed files with 6 additions and 2 deletions

View File

@@ -382,6 +382,7 @@ void file_test(const char* file, byte* check)
ret = wc_Sha256Update(&sha256, buf, i);
if (ret != 0) {
printf("Can't wc_Sha256Update %d\n", ret);
fclose(f);
return;
}
}
@@ -389,6 +390,7 @@ void file_test(const char* file, byte* check)
ret = wc_Sha256Final(&sha256, shasum);
if (ret != 0) {
printf("Can't wc_Sha256Final %d\n", ret);
fclose(f);
return;
}