diff --git a/src/iperf_api.c b/src/iperf_api.c index 9e93357..cbf8be6 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -2913,7 +2913,7 @@ iperf_free_test(struct iperf_test *test) if (test->logfile) { free(test->logfile); test->logfile = NULL; - if (test->outfile) { + if (test->outfile && test->outfile != stdout) { fclose(test->outfile); test->outfile = NULL; }