From 80fff4e0e6e37f02d7b88c1238bde8910690765d Mon Sep 17 00:00:00 2001 From: Alex Young Date: Thu, 21 Jun 2012 11:55:21 +0100 Subject: [PATCH] Squash a valgrind error caused by debug output --- src/ioutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;