summaryrefslogtreecommitdiff
path: root/midx.h
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2020-04-24 13:17:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-24 20:09:49 (GMT)
commit6c7ff7cf7f431e4accf360c018149d1e263eaf06 (patch)
tree5c244a9b0d966aeeecdf6558afb5395e13a0c5ec /midx.h
parent6a22d521260f86dff8fe6f23ab329cebb62ba4f0 (diff)
downloadgit-6c7ff7cf7f431e4accf360c018149d1e263eaf06.zip
git-6c7ff7cf7f431e4accf360c018149d1e263eaf06.tar.gz
git-6c7ff7cf7f431e4accf360c018149d1e263eaf06.tar.bz2
multi-pack-index: close file descriptor after mmap
The multi-pack-index subsystem was not closing its file descriptor after memory-mapping the file contents. After this mmap() succeeds, there is no need to keep the file descriptor open. In fact, there is signficant reason to close it so we do not run out of descriptors. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.h')
-rw-r--r--midx.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/midx.h b/midx.h
index a210f1a..33c36ae 100644
--- a/midx.h
+++ b/midx.h
@@ -6,8 +6,6 @@
struct multi_pack_index {
struct multi_pack_index *next;
- int fd;
-
const unsigned char *data;
size_t data_len;