summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-11-11 21:34:06 -0800
committerJunio C Hamano <gitster@pobox.com>2011-11-11 21:34:06 -0800
commitdc865af65f2f97a738a1761d7e9d389101e29e7b (patch)
tree8d151a708e51694dfe458deef90a18696fc76f07 /builtin
parent248dbbe83256202f0edd6e1468d01cfbe27fd733 (diff)
parentc444c16589f95ac22d8e3ffe603cd7f0613512ce (diff)
downloadgit-dc865af65f2f97a738a1761d7e9d389101e29e7b.tar.gz
Merge branch 'ly/mktree-using-strbuf'
* ly/mktree-using-strbuf: mktree: fix a memory leak in write_tree()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mktree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/mktree.c b/builtin/mktree.c
index 098395fda1..4ae1c412d4 100644
--- a/builtin/mktree.c
+++ b/builtin/mktree.c
@@ -60,6 +60,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[] = {