summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-01-07 17:10:35 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-07 14:31:52 -0800
commit648027c4c85bbfdcf0663ff51e55425aefac14a9 (patch)
tree0fda9e66db11f75bf42925e437bf2b81ce745d27 /builtin
parentcat-file: refactor error handling of batch_objects (diff)
downloadtgif-648027c4c85bbfdcf0663ff51e55425aefac14a9.tar.xz
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')
-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;
}