Fix memory leak in an error condition.
We weren't free()-ing test->settings when we bailed out in a certain error state. Fixes #1332.
This commit is contained in:
parent
3a8e21f33a
commit
abb24a2efc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user