From cd9519bd2c5c666cfb3ec219ee0b47c83f26f3fe Mon Sep 17 00:00:00 2001 From: Liu Yuan Date: Thu, 10 Nov 2011 16:39:22 +0800 Subject: [PATCH] mktree: fix a memory leak in write_tree() We forget to call strbuf_release to release the buf memory. Signed-off-by: Liu Yuan Signed-off-by: Junio C Hamano --- mktree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mktree.c b/mktree.c index 2e84889c0..bb23c4425 100644 --- a/mktree.c +++ b/mktree.c @@ -61,6 +61,7 @@ static void write_tree(unsigned char *sha1) } write_sha1_file(buf.buf, buf.len, tree_type, sha1); + strbuf_release(&buf); } static const char mktree_usage[] = "git-mktree [-z]"; -- 2.30.2