Signed-off-by: Alex Riesen --- ident.c | 49 ++++++++++++++++++++++++++++++++----------------- 1 files changed, 32 insertions(+), 17 deletions(-) On 7/31/07, Kristian Høgsberg wrote: > There's number of buffers that don't get freed: the strbuf, the commit > message buffer, and the strdup'ed author and committer info. All the > leaks are not critical since the process exits immediately. As for the > strbuf leak, I was thinking about renaming strbuf_begin to strbuf_reset > and making it public[1], which will then be used for freeing up strbuf > memory. The message buffer leak should be fixed by adding a > strbuf_read_fd() that just reads it straight into the strbuf. The > xstrdup's are necessary because fmt_ident uses a static buffer (thanks, > test case :). We could add rotating static buffers for fmt_ident like > git_path and avoid the strdups, but again, the leaks are not critical. Ach, that's why... Junio, how about this then? I'd even suggest adding the buffer argument to fmt_ident and use it everywhere (ATM there is only one user outside of ident.c: builtin-blame.c). This one is applicable immediately, though