Re: [PATCH 2/3] bundle.c: fix memory leak

2015-03-10 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: There was one continue statement without an accompanying `free(ref)`. Instead of adding that, replace all the freecontinue with a goto just after writing the refs, where we'd do the free anyway and then reloop. Signed-off-by: Stefan Beller

Re: [PATCH 2/3] bundle.c: fix memory leak

2015-03-10 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: The continue statements nearby also have an accompanying free(ref); Signed-off-by: Stefan Beller sbel...@google.com --- I wonder what happens when dwim_ref() returned 2 or more, though. bundle.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 2/3] bundle.c: fix memory leak

2015-03-10 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: On Tue, Mar 10, 2015 at 3:40 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: The continue statements nearby also have an accompanying free(ref); Signed-off-by: Stefan Beller sbel...@google.com --- I wonder what

[PATCH 2/3] bundle.c: fix memory leak

2015-03-10 Thread Stefan Beller
There was one continue statement without an accompanying `free(ref)`. Instead of adding that, replace all the freecontinue with a goto just after writing the refs, where we'd do the free anyway and then reloop. Signed-off-by: Stefan Beller sbel...@google.com --- bundle.c | 11 +-- 1 file

[PATCH 2/3] bundle.c: fix memory leak

2015-03-09 Thread Stefan Beller
The continue statements nearby also have an accompanying free(ref); Signed-off-by: Stefan Beller sbel...@google.com --- bundle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bundle.c b/bundle.c index 2e2dbd5..534783d 100644 --- a/bundle.c +++ b/bundle.c @@ -342,6 +342,7 @@ static int