mktree: fix a memory leak in write_tree()
PATCH 1/1 mktree: fix a memory leak in write_tree()
From: Liu Yuan <[email protected]>
We forget to call strbuf_release to release the buf memory.
Signed-off-by Liu Yuan <[email protected]>
--- builtin/mktree.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
builtin/mktree.c +1 -0
@@ -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[] = {
Signature · 1 line
1.7.6.1