aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/iperf_api.c')
-rw-r--r--src/iperf_api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/iperf_api.c b/src/iperf_api.c
index ad2453b..88fed30 100644
--- a/src/iperf_api.c
+++ b/src/iperf_api.c
@@ -2662,6 +2662,15 @@ iperf_free_test(struct iperf_test *test)
free(prot);
}
+ if (test->logfile) {
+ free(test->logfile);
+ test->logfile = NULL;
+ if (test->outfile) {
+ fclose(test->outfile);
+ test->outfile = NULL;
+ }
+ }
+
if (test->server_output_text) {
free(test->server_output_text);
test->server_output_text = NULL;