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