From: Jeff King Date: Fri, 22 May 2015 00:53:36 +0000 (-0400) Subject: test_bitmap_walk: free bitmap with bitmap_free X-Git-Tag: v2.4.4~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d201a1ecdb1231a349d696a2252b7209ef7be103;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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,