Fix minor memory leak.
Submitted by: Susant Sahani <ssahani@redhat.com>
Этот коммит содержится в:
родитель
dd05057260
Коммит
e3faf8e421
@ -1492,8 +1492,10 @@ iperf_defaults(struct iperf_test *testp)
|
||||
return -1;
|
||||
memset(tcp, 0, sizeof(struct protocol));
|
||||
udp = (struct protocol *) malloc(sizeof(struct protocol));
|
||||
if (!udp)
|
||||
if (!udp) {
|
||||
free(tcp);
|
||||
return -1;
|
||||
}
|
||||
memset(udp, 0, sizeof(struct protocol));
|
||||
|
||||
tcp->id = Ptcp;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user