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>
This commit is contained in:
Jeff King 2015-05-21 20:53:36 -04:00 committed by Junio C Hamano
parent f86a3747ab
commit d201a1ecdb

View File

@ -987,7 +987,7 @@ void test_bitmap_walk(struct rev_info *revs)
else else
fprintf(stderr, "Mismatch!\n"); fprintf(stderr, "Mismatch!\n");
free(result); bitmap_free(result);
} }
static int rebuild_bitmap(uint32_t *reposition, static int rebuild_bitmap(uint32_t *reposition,