Add missing close() in test stubs
parent
9aaad28488
commit
851507c147
|
@ -150,6 +150,7 @@ int connect_osd(const char *osd_address, int osd_port)
|
|||
if (connect(connect_fd, (sockaddr*)&addr, sizeof(addr)) < 0)
|
||||
{
|
||||
perror("connect");
|
||||
close(connect_fd);
|
||||
return -1;
|
||||
}
|
||||
int one = 1;
|
||||
|
|
|
@ -83,6 +83,7 @@ int connect_stub(const char *server_address, int server_port)
|
|||
if (connect(connect_fd, (sockaddr*)&addr, sizeof(addr)) < 0)
|
||||
{
|
||||
perror("connect");
|
||||
close(connect_fd);
|
||||
return -1;
|
||||
}
|
||||
int one = 1;
|
||||
|
|
Loading…
Reference in New Issue