summaryrefslogtreecommitdiff
path: root/pack-bitmap.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-05-21 20:53:36 -0400
committerJunio C Hamano <gitster@pobox.com>2015-05-22 09:03:04 -0700
commitd201a1ecdb1231a349d696a2252b7209ef7be103 (patch)
tree2353dbb480762113adf8b001e99a1d4db94a9388 /pack-bitmap.c
parentf86a3747abc742359397e3050b1fbef297415de5 (diff)
downloadgit-d201a1ecdb1231a349d696a2252b7209ef7be103.tar.gz
test_bitmap_walk: free bitmap with bitmap_freesb/test-bitmap-free-at-end
Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30) noticed that we leak the "result" bitmap. But we should use "bitmap_free" rather than straight "free", as the former remembers to free the bitmap array pointed to by the struct. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r--pack-bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 5e9adc234d..3badc2dd1d 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -987,7 +987,7 @@ void test_bitmap_walk(struct rev_info *revs)
else
fprintf(stderr, "Mismatch!\n");
- free(result);
+ bitmap_free(result);
}
static int rebuild_bitmap(uint32_t *reposition,