From: Stefan Beller Date: Tue, 31 Mar 2015 01:22:11 GMT Subject: [PATCHv3 6/6] entry.c: fix a memleak Message-ID: <1427764931-27745-7-git-send-email-sbeller@google.com> In-Reply-To: <1427764931-27745-1-git-send-email-sbeller@google.com> From: John Keeping stream_blob_to_fd() always frees the filter now, so there is no memory leak in entry.c:152 just before the `goto finish`. Signed-off-by: John Keeping Signed-off-by: Stefan Beller --- I added Johns signoff here tentatively, John can you confirm the sign off? streaming.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/streaming.c b/streaming.c index 2ff036a..811fcc2 100644 --- a/streaming.c +++ b/streaming.c @@ -507,8 +507,11 @@ int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f int result = -1; st = open_istream(sha1, &type, &sz, filter); - if (!st) + if (!st) { + if (filter) + free_stream_filter(filter); return result; + } if (type != OBJ_BLOB) goto close_and_exit; for (;;) { -- 2.3.0.81.gc37f363