Skip to content

Commit

Permalink
test_bitmap_walk: free bitmap with bitmap_free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed May 22, 2015
1 parent f86a374 commit d201a1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pack-bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d201a1e

Please sign in to comment.