summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-11-11 21:34:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-11-11 21:34:06 -0800
commitdc865af65f2f97a738a1761d7e9d389101e29e7b (patch)
tree8d151a708e51694dfe458deef90a18696fc76f07 /builtin
parentMerge branch 'sn/complete-bash-wo-process-subst' (diff)
parentMerge "Move 'builtin-*' into a 'builtin/' subdirectory" (diff)
downloadtgif-dc865af65f2f97a738a1761d7e9d389101e29e7b.tar.xz
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[] = {