io: fix mmap bstream fd leak

We need to close the fd on destruction. This is what the corresponding
istream variant does too.
cute-signatures
Timo Teras 2009-06-11 13:03:10 +03:00
parent 3646350479
commit 49c904c993
1 changed files with 2 additions and 1 deletions

View File

@ -257,6 +257,7 @@ static void mmap_close(void *stream, csum_t csum, size_t *size)
*size = mbs->size; *size = mbs->size;
munmap(mbs->ptr, mbs->size); munmap(mbs->ptr, mbs->size);
close(mbs->fd);
free(mbs); free(mbs);
} }