| fix minor fd leak regression in handlebin - geomyidae - A small C-based gopherd. | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit e1ad0cf0b73a9ed594dfcb040044627b1e358e60 | |
| parent 37420efd2d6430a88d60edd2c373689069b3c26e | |
| Author: Hiltjo Posthuma <[email protected]> | |
| Date: Wed, 7 Feb 2018 20:48:52 +0100 | |
| fix minor fd leak regression in handlebin | |
| Signed-off-by: Christoph Lohmann <[email protected]> | |
| Diffstat: | |
| M handlr.c | 1 + | |
| M ind.c | 1 - | |
| 2 files changed, 1 insertion(+), 1 deletion(-) | |
| --- | |
| diff --git a/handlr.c b/handlr.c | |
| @@ -116,6 +116,7 @@ handlebin(int sock, char *file, char *port, char *base, cha… | |
| if (fd >= 0) { | |
| if (xsendfile(fd, sock) < 0) | |
| perror("sendfile"); | |
| + close(fd); | |
| } | |
| } | |
| diff --git a/ind.c b/ind.c | |
| @@ -71,7 +71,6 @@ pendingbytes(int sock) | |
| void | |
| waitforpendingbytes(int sock) | |
| { | |
| - | |
| while (pendingbytes(sock) > 0) | |
| usleep(10); | |
| } |