diff options
author | Liu Yuan <tailai.ly@taobao.com> | 2011-11-10 16:39:22 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:04:08 -0800 |
commit | cd9519bd2c5c666cfb3ec219ee0b47c83f26f3fe (patch) | |
tree | 2d16084aae0f522a201cb9842aced987e1560c79 | |
parent | d52bc66152834dff3fb5f32a54f6ed57730f58c6 (diff) | |
download | git-cd9519bd2c5c666cfb3ec219ee0b47c83f26f3fe.tar.gz |
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>
-rw-r--r-- | mktree.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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]"; |