1
1

Added a check for malloc fail.

Eventually we need to add a whole bunch more of these.
Этот коммит содержится в:
Jef Poskanzer 2013-12-12 08:15:15 -08:00
родитель b70c54055f
Коммит c8a0a2229d

Просмотреть файл

@ -1363,6 +1363,11 @@ iperf_new_test()
memset(test, 0, sizeof(struct iperf_test));
test->settings = (struct iperf_settings *) malloc(sizeof(struct iperf_settings));
if (!test->settings) {
free(test);
i_errno = IENEWTEST;
return NULL;
}
memset(test->settings, 0, sizeof(struct iperf_settings));
return test;