Close file streams in FIPS algorithm test utilities.

This commit is contained in:
Dr. Stephen Henson 2011-12-08 15:14:38 +00:00
parent 81fc8cd029
commit 7c0d30038f
2 changed files with 8 additions and 0 deletions

View file

@ -279,6 +279,10 @@ int main(int argc, char **argv)
rhash, rhashlen);
}
}
if (in && in != stdin)
fclose(in);
if (out && out != stdout)
fclose(out);
return 0;
parse_error:
fprintf(stderr, "Error Parsing request file\n");

View file

@ -484,6 +484,10 @@ int main(int argc, char **argv)
BN_free(cy);
if (group)
EC_GROUP_free(group);
if (in && in != stdin)
fclose(in);
if (out && out != stdout)
fclose(out);
if (rv)
fprintf(stderr, "Error Parsing request file\n");
return rv;