diff options
-rw-r--r-- | midx.c | 4 | ||||
-rw-r--r-- | midx.h | 2 |
2 files changed, 1 insertions, 5 deletions
@@ -72,9 +72,9 @@ struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local FREE_AND_NULL(midx_name); midx_map = xmmap(NULL, midx_size, PROT_READ, MAP_PRIVATE, fd, 0); + close(fd); FLEX_ALLOC_STR(m, object_dir, object_dir); - m->fd = fd; m->data = midx_map; m->data_len = midx_size; m->local = local; @@ -190,8 +190,6 @@ void close_midx(struct multi_pack_index *m) return; munmap((unsigned char *)m->data, m->data_len); - close(m->fd); - m->fd = -1; for (i = 0; i < m->num_packs; i++) { if (m->packs[i]) @@ -12,8 +12,6 @@ struct repository; struct multi_pack_index { struct multi_pack_index *next; - int fd; - const unsigned char *data; size_t data_len; |