summaryrefslogtreecommitdiffstats
path: root/fips
diff options
context:
space:
mode:
Diffstat (limited to 'fips')
-rw-r--r--fips/dh/fips_dhvs.c4
-rw-r--r--fips/ecdh/fips_ecdhvs.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/fips/dh/fips_dhvs.c b/fips/dh/fips_dhvs.c
index 3ba1977862..0fb52f79a4 100644
--- a/fips/dh/fips_dhvs.c
+++ b/fips/dh/fips_dhvs.c
@@ -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");
diff --git a/fips/ecdh/fips_ecdhvs.c b/fips/ecdh/fips_ecdhvs.c
index 61d216d1b7..a1422868b3 100644
--- a/fips/ecdh/fips_ecdhvs.c
+++ b/fips/ecdh/fips_ecdhvs.c
@@ -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;