Fix virtual address space leak -- was unmapping with the wrong size due
to a spurious extra sizeof().
if (blerg->data_fd != -1)
close(blerg->data_fd);
if (blerg->index != NULL)
if (blerg->data_fd != -1)
close(blerg->data_fd);
if (blerg->index != NULL)
- munmap((void *)blerg->index, sizeof(RECORDS_PER_SEGMENT * sizeof(struct record)));
+ munmap((void *)blerg->index, RECORDS_PER_SEGMENT * sizeof(struct record));
if (blerg->index_fd != -1)
close(blerg->index_fd);
}
if (blerg->index_fd != -1)
close(blerg->index_fd);
}