diff --git a/src/iperf_api.c b/src/iperf_api.c index c2ee31f..d439f45 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -2137,6 +2137,7 @@ iperf_new_stream(struct iperf_test *test, int s) sp->settings = test->settings; sp->result = (struct iperf_stream_result *) malloc(sizeof(struct iperf_stream_result)); if (!sp->result) { + free(sp); i_errno = IECREATESTREAM; return NULL; }