test_bitmap_walk: free bitmap with bitmap_free
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>
Jeff King committed
May 21, 2015 at 20:53 UTC
d201a1ecdb1231a349d696a2252b7209ef7be103
1 file changed
+1
-1
pack-bitmap.c
+1
-1
@@ -987,7 +987,7 @@ void test_bitmap_walk(struct rev_info *revs)
987
else
988
fprintf(stderr, "Mismatch!\n");
989
990
- free(result);
990
+ bitmap_free(result);
991
}
992
993
static int rebuild_bitmap(uint32_t *reposition,