diff --git a/src/iperf_api.c b/src/iperf_api.c index 52b2dfe18..20ba16a40 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -2703,6 +2703,7 @@ iperf_new_test() test->bitrate_limit_intervals_traffic_bytes = (iperf_size_t *) malloc(sizeof(iperf_size_t) * MAX_INTERVAL); if (!test->bitrate_limit_intervals_traffic_bytes) { + free(test->settings); free(test); i_errno = IENEWTEST; return NULL;