Skip to content

Commit d201a1e

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f86a374 commit d201a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pack-bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ void test_bitmap_walk(struct rev_info *revs)
987987
else
988988
fprintf(stderr, "Mismatch!\n");
989989

990-
free(result);
990+
bitmap_free(result);
991991
}
992992

993993
static int rebuild_bitmap(uint32_t *reposition,

0 commit comments

Comments
 (0)