[RFC memory leak?] Minor memory leak fix

2014-03-11 Thread Fredrik Gustafsson
Strbuf needs to be released even if it's locally declared. Signed-off-by: Fredrik Gustafsson iv...@iveqy.com --- archive.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/archive.c b/archive.c index 346f3b2..d6d56e6 100644 --- a/archive.c +++

Re: [RFC memory leak?] Minor memory leak fix

2014-03-11 Thread Duy Nguyen
On Tue, Mar 11, 2014 at 5:45 PM, Fredrik Gustafsson iv...@iveqy.com wrote: Strbuf needs to be released even if it's locally declared. path is declared static. So yes it's a leak but the leak is minimum. Your patch would make more sense if static is gone and it's leaked after every

Re: [RFC memory leak?] Minor memory leak fix

2014-03-11 Thread Fredrik Gustafsson
On Tue, Mar 11, 2014 at 06:58:11PM +0700, Duy Nguyen wrote: On Tue, Mar 11, 2014 at 5:45 PM, Fredrik Gustafsson iv...@iveqy.com wrote: Strbuf needs to be released even if it's locally declared. path is declared static. So yes it's a leak but the leak is minimum. Your patch would make more

Re: [RFC memory leak?] Minor memory leak fix

2014-03-11 Thread Junio C Hamano
Fredrik Gustafsson iv...@iveqy.com writes: On Tue, Mar 11, 2014 at 06:58:11PM +0700, Duy Nguyen wrote: On Tue, Mar 11, 2014 at 5:45 PM, Fredrik Gustafsson iv...@iveqy.com wrote: Strbuf needs to be released even if it's locally declared. path is declared static. So yes it's a leak but the