[PATCH v2 2/5] cat-file: fix a minor memory leak in batch_objects
- From
Jeff King <peff@peff.net>
- Date
- Jan 7, 2014, 23:57 UTC
- Message-ID
- <20140107235725.GB10657@sigill.intra.peff.net>
- In-Reply-To
- <20140107235631.GA10503@sigill.intra.peff.net>
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> --- builtin/cat-file.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 971cdde..ce79103 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -314,6 +314,7 @@ static int batch_objects(struct batch_options *opt) break; } + strbuf_release(&buf); return retval; }
-- 1.8.5.2.500.g8060133