Close file streams in FIPS algorithm test utilities.
This commit is contained in:
parent
81fc8cd029
commit
7c0d30038f
2 changed files with 8 additions and 0 deletions
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue