On Mon, 2007-07-30 at 21:43 -0700, Junio C Hamano 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.
Kristian
[1] strbuf_begin() is a good name the way it's used in strbuf.c where
it's balanced by strbuf_end(), but as a general purpose reset function
it's better name strbuf_reset(), I think
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html