diff --git a/src/ioutil.c b/src/ioutil.c index 0d1883c..89ad47c 100644 --- a/src/ioutil.c +++ b/src/ioutil.c @@ -54,7 +54,7 @@ struct bitset_mapping* build_allocation_map(int fd, uint64_t size, int resolutio ); } - for (i=0; i<16; i++) { + for (i=0; i<(size/resolution); i++) { debug("map[%d] = %d%d%d%d%d%d%d%d", i, (allocation_map->bits[i] & 1) == 1, @@ -68,6 +68,7 @@ struct bitset_mapping* build_allocation_map(int fd, uint64_t size, int resolutio ); } + free(fiemap); return allocation_map;