From: Fredrik Tolf Date: Thu, 12 Feb 2026 01:33:39 +0000 (+0100) Subject: sendfile: Fix file-descriptor leak in compression. X-Git-Url: http://www.dolda2000.com/gitweb/?a=commitdiff_plain;p=ashd.git sendfile: Fix file-descriptor leak in compression. --- diff --git a/src/compress.c b/src/compress.c index e1f05fa..eabea8d 100644 --- a/src/compress.c +++ b/src/compress.c @@ -283,6 +283,8 @@ int ccopen(char *path, struct stat *sb, char *accept, const char **encoding) msb.st_mtime = sb->st_mtime; msb.st_ctime = sb->st_ctime; mtype = type; + } else { + close(efd); } } }