Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-14 21:49:09 +0300
committerJunio C Hamano <gitster@pobox.com>2015-04-14 21:49:09 +0300
commitd2ae751b1cae0674e0a1f7fe4da0a341365cefbb (patch)
treeb17a8284ef636947f9a85f15fbfa965919bd1654 /streaming.c
parent0cb7054e755f5d2bf9e7ba7471481cbd0957fb96 (diff)
parent9ce4ad3e0eac33b4cae38ebd76c26ddba2468631 (diff)
Merge branch 'sb/plug-streaming-leak'
* sb/plug-streaming-leak: streaming.c: fix a memleak
Diffstat (limited to 'streaming.c')
-rw-r--r--streaming.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/streaming.c b/streaming.c
index 2ff036a0fa..811fcc24d2 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 (;;) {