mktree: fix a memory leak in write_tree()

We forget to call strbuf_release to release the buf memory. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Liu Yuan committed Nov 10, 2011 at 16:39 UTC cd9519bd2c5c666cfb3ec219ee0b47c83f26f3fe
1 file changed +1
mktree.c
+1
@@ -61,6 +61,7 @@ static void write_tree(unsigned char *sha1)
61 }
62
63 write_sha1_file(buf.buf, buf.len, tree_type, sha1);
64 + strbuf_release(&buf);
65 }
66
67 static const char mktree_usage[] = "git-mktree [-z]";