{"thread":{"id":"39404","subject":"[PATCH] test_bitmap_walk: free bitmap with bitmap_free","startedAt":"2015-05-22T00:53:36Z","lastAt":"2015-05-22T16:37:27Z","messageCount":2,"participants":["Jeff King","Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"261871","messageId":"20150522005336.GA26326@peff.net","threadId":"39404","inReplyTo":null,"subject":"[PATCH] test_bitmap_walk: free bitmap with bitmap_free","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-22T00:53:36Z","receivedAt":"2015-05-22T00:53:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)\nnoticed that we leak the \"result\" bitmap. But we should use\n\"bitmap_free\" rather than straight \"free\", as the former\nremembers to free the bitmap array pointed to by the struct.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nSorry, I should have noticed this when reviewing the original.\n\n pack-bitmap.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/pack-bitmap.c b/pack-bitmap.c\nindex 62a98cc..d64bd94 100644\n--- a/pack-bitmap.c\n+++ b/pack-bitmap.c\n@@ -987,7 +987,7 @@ void test_bitmap_walk(struct rev_info *revs)\n \telse\n \t\tfprintf(stderr, \"Mismatch!\\n\");\n \n-\tfree(result);\n+\tbitmap_free(result);\n }\n \n static int rebuild_bitmap(uint32_t *reposition,\n-- \n2.4.1.528.g00591e3\n"},{"id":"261924","messageId":"CAGZ79kZqRE78qFGPcU9xiFDiGG3X0kaBFdH+rGhUCZBM3ikUDA@mail.gmail.com","threadId":"39404","inReplyTo":"20150522005336.GA26326@peff.net","subject":"Re: [PATCH] test_bitmap_walk: free bitmap with bitmap_free","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-05-22T16:37:27Z","receivedAt":"2015-05-22T16:37:27Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, May 21, 2015 at 5:53 PM, Jeff King <peff@peff.net> wrote:\n> Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)\n> noticed that we leak the \"result\" bitmap. But we should use\n> \"bitmap_free\" rather than straight \"free\", as the former\n> remembers to free the bitmap array pointed to by the struct.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> Sorry, I should have noticed this when reviewing the original.\n\nNo need to be sorry, me too.\nThis looks good to me.\n\n>\n>  pack-bitmap.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/pack-bitmap.c b/pack-bitmap.c\n> index 62a98cc..d64bd94 100644\n> --- a/pack-bitmap.c\n> +++ b/pack-bitmap.c\n> @@ -987,7 +987,7 @@ void test_bitmap_walk(struct rev_info *revs)\n>         else\n>                 fprintf(stderr, \"Mismatch!\\n\");\n>\n> -       free(result);\n> +       bitmap_free(result);\n>  }\n>\n>  static int rebuild_bitmap(uint32_t *reposition,\n> --\n> 2.4.1.528.g00591e3\n"}]}