зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
d52bc66152
Коммит
cd9519bd2c
1
mktree.c
1
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]";
|
||||
|
|
Загрузка…
Ссылка в новой задаче