diff --git a/io/iob_addbuf_munmap.c b/io/iob_addbuf_munmap.c index 10b09b0..86bd370 100644 --- a/io/iob_addbuf_munmap.c +++ b/io/iob_addbuf_munmap.c @@ -3,7 +3,7 @@ #include "iob_internal.h" static void cleanup(struct iob_entry* x) { - munmap((char*)x->buf,x->n); + munmap((char*)x->buf,x->offset+x->n); } int iob_addbuf_munmap(io_batch* b,const void* buf,uint64 n) {