From: Fredrik Tolf Date: Sat, 15 May 2021 01:29:16 +0000 (+0200) Subject: htpipe: Fixed socket leakage. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=62687b1f636746105fba821d2a9006e48b5fe8be;p=ashd.git htpipe: Fixed socket leakage. --- diff --git a/src/htpipe.c b/src/htpipe.c index 223212e..27e5480 100644 --- a/src/htpipe.c +++ b/src/htpipe.c @@ -124,6 +124,7 @@ static void runserver(int lsk, int ch) if((rfd = recvreq(cl[i], &req)) < 0) { if(errno != 0) flog(LOG_ERR, "htpipe: error from client: %s", strerror(errno)); + close(cl[i]); cl[i] = -1; } else { if(sendreq(ch, req, rfd)) {