Skip to content

Commit 42bd2d5

Browse files
committed
Prevent fd leak
1 parent ff61d85 commit 42bd2d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gateway.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ void get_clients_from_parent(void) {
122122

123123
if (connect(sock, (struct sockaddr *)&sa_un, strlen(sa_un.sun_path) + sizeof(sa_un.sun_family))) {
124124
debug(LOG_ERR, "Failed to connect to parent (%s) - client list not downloaded", strerror(errno));
125+
close(sock);
125126
return;
126127
}
127128

0 commit comments

Comments
 (0)