Add missing close() in test stubs

This commit is contained in:
Vitaliy Filippov
2023-03-15 00:23:56 +03:00
parent 9aaad28488
commit 851507c147
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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;
+1
View File
@@ -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;