diff options
author | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2005-10-22 08:10:07 +0000 |
---|---|---|
committer | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2005-10-22 08:10:07 +0000 |
commit | 82b8cb0da1c1fea32cff9746e5d601af25c444a2 (patch) | |
tree | c02e2d1ca666092f2f6b7ecf5672694c6bc0d1e8 /src/mod_compress.c | |
parent | 8cc6292359f4a676b1d8c2b2265ab188bda01ddc (diff) | |
download | lighttpd-82b8cb0da1c1fea32cff9746e5d601af25c444a2.tar.gz |
close fds on error and add CLOEXEC to FDs which stay open for a longer time
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@794 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_compress.c')
-rw-r--r-- | src/mod_compress.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mod_compress.c b/src/mod_compress.c index def2be6c..6d647565 100644 --- a/src/mod_compress.c +++ b/src/mod_compress.c @@ -439,6 +439,9 @@ static int deflate_file_to_file(server *srv, connection *con, plugin_data *p, bu } if (-1 == (r = write(ofd, p->b->ptr, p->b->used))) { + munmap(start, sce->st.st_size); + close(ofd); + close(ifd); return -1; } |