Browse files

unix: fix file descriptor leak

  • Loading branch information...
1 parent cdb3601 commit 2069a24e8c48ab661fc5f6a1e73bfc0f910b9513 @bnoordhuis bnoordhuis committed Oct 15, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/unix/stream.c
View
2 src/unix/stream.c
@@ -209,8 +209,8 @@ int uv_accept(uv_stream_t* server, uv_stream_t* client) {
if (uv__stream_open(streamClient, streamServer->accepted_fd,
UV_READABLE | UV_WRITABLE)) {
/* TODO handle error */
- streamServer->accepted_fd = -1;
uv__close(streamServer->accepted_fd);
+ streamServer->accepted_fd = -1;
goto out;
}

0 comments on commit 2069a24

Please sign in to comment.