summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-01-07 17:10:35 -0500
committerJunio C Hamano <gitster@pobox.com>2014-01-07 14:31:52 -0800
commit648027c4c85bbfdcf0663ff51e55425aefac14a9 (patch)
tree0fda9e66db11f75bf42925e437bf2b81ce745d27 /builtin/cat-file.c
parent07e23839459465c1319c7ce91afaf01d3e31a97e (diff)
downloadgit-648027c4c85bbfdcf0663ff51e55425aefac14a9.tar.gz
cat-file: fix a minor memory leak in batch_objects
We should always have been freeing our strbuf, but doing so consistently was annoying until the refactoring in the previous patch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 6b65f56f44..1fdb980258 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -304,6 +304,7 @@ static int batch_objects(struct batch_options *opt)
break;
}
+ strbuf_release(&buf);
return retval;
}